Counting total customers

I need help with counting all the customers in 0customer in Query Designer 7.0.
1. I created a formula variable: Replacement Path, Reference Char = 0customer, Replace with = Attrib Value, Attribute= characeter reference.
2. I assigned this to a Calculated Key Figure.
3. The query is using a sales order multiprovider with a restriction on 0calday =  previous day
4. When I run the query (again, restricted to previous day) it  appears that the total number of customers is only based on the result of the query..lets say 5,000 customers when I know that there are 50,000 customers in 0customer.
5. What I need for the variable to return is the total customers (the 50,000) not the 5,000.  I need to know the % of our customers who bough yesterday so that is why the total customers is important to be retrieved.
Does anyone know what I am doing wrong?  Why can't I get the total #number of customers from master data when I created a replacement path variable.
Much appreciated!
Pat

Hi patrick,
You can get the count by option of exception aggregation in the query. Now you wanted to count the number of customers .
In the query designer, Take any of the key figures(in a new formula/CKF) to columns pane let us say Amount, Change the aggregation to exception aggregation with reference to the Characterstic customer, say Count all values.
In the result row of the column you will get the total customer number count.
OR
Create a formula variable(you can create this type of variable in the Formula keyfigure screen in query designer) and choose processing by = ' Replacement path' . Assign the reference characteristics 0customer and in the replacement path tab use the below options.
1. Replace variable with = 'InfoObject'
2. Replace with = 'Attribute value'.
3. Attribute = 'Characteristics reference (Constant 1) .
And remove the default option 'variable is ready for input' from the basic settings.Then use this variable in the formula keyfigure by multipling by 1.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a?quicklink=index&overridelayout=true
regards
KP

Similar Messages

  • Count total number of rows present in the schema

    Count total number of rows present in the schema including table, sequence, view
    Desirable Output
    table          Sequence     Views
    1000          20          1000

    You mean You need to count the No of Tables, View and Sequence Present in the Schema ??
    Hi Some thing like this,
    SELECT a.view_cnt AS "View Count", b.tab_cnt AS "Table Count",
           c.seq_cnt AS "Sequence Count"
      FROM (SELECT COUNT (*) view_cnt
              FROM USER_VIEWS) a,
           (SELECT COUNT (*) tab_cnt
              FROM USER_TABLES) b,
           (SELECT COUNT (*) seq_cnt
              FROM USER_SEQUENCES) cWhich give you,
    View Count      Table Count      Sequence Count
           153              878                   32Thanks,
    Shankar
    Edited by: Shankar Viji on Aug 28, 2012 3:03 AM

  • Count total page in ABAP list

    Dear Expert,
    Please help me, how to count total page in ABAP list ?
    Any suggestion or idea to solve this question ?
    Thank you.
    Really appreciate your respond and solution.

    In the first statement of ur report u'll have to reserve some lines for footer as follows:
    REPORT <prg name> LINE-COUNT 25(2).
    here ur list will display 23 lines of data and then 2 lines are reserved for footer.
    This means that in each page u can display 23 lines of text.  Now depending on number of entries in your internal table which contains data to be displayed, we can calculate the number of pages required to print the total output.
    E.g: I have 62 records in my internal table, so to get the total number of pages use the following logic:
          (U can find out the number of recs in internal table dynamically using DESCRIBE stmt)
           62/23 = 2.69
           Round the result to the next integer using CEIL , so the next interger is 3.
           So ur total number of pages is 3.  And u now the current page number by sy-pagno.
    Hope this solves ur problem.

  • Count total rows?

    Hello,
    In some function of my program, I need to count total number of rows but, I don't need to fetch results. Only the number of rows.
    Is there any way to count the total number of result rows without fetch?
    In OCI ver.7, it was very simple.
    Just Call ofen() (OCIStmtFetch() in ver.8) without defining, but it's impossible that fetch without defining in Ver.8
    Is there any idea to solve this situation?
    I can defining and fetching just like normal process, but customer can send any SQL statement so, it can include LOBs.. and so on.
    It's very waste source codes and memory for just counting rows.
    Thank you

    One possibility is to execute a different statement
    (i.e. select count(*) from foo;) to get the number of
    rows directly. This would probably be the most efficient
    way to get the row count (since no row data is shipped
    with this statement).
    Unfortunately, I was unable to fetch rows w/o defining
    in OCI either (I got an ORA-24374), so I am not sure how
    you can get around this.
    Incidentallly, when fetching LOBs, I don't think that
    the entire lob is fetched, only the LOB locator. In this
    case, there is very little over head associated with the
    data transfer.
    Also, I believe that ofen() was doing roundtrips in the
    past, and my impression was that the latency of the
    roundtrip to the server (and not the associated latency
    of transferring the data) was the bottleneck here. Hence,
    there may not be as much of a performance penalty as
    expected for doing the extra client define with OCI
    v8. So you still might be able to use your old ofen logic
    (after replacing with OCIStmtExecute/OCIDefine) and not
    see a very high performance hit.
    Hope that helps out somewh

  • Count total no of records in csv file

    hello
    i made a function which count total no of records in csv file.
    but it always return 0 goes in the exception when no data found which
    it also display the total no of records in another parameter.
    code is here
    CREATE OR REPLACE FUNCTION COUNT_RECORDS_CSV (storeid1 number ) RETURN NUMBER
    IS
    wfile_handl UTL_FILE.FILE_TYPE;     
    v_file varchar(100);
    S VARCHAR2(32767);
    c number :=0;
    v_dir VARCHAR2 (50) := 'REPORTS';
    BEGIN
    v_file :='DATA_'||storeid1 ||'.CSV';
    DBMS_OUTPUT.PUT_LINE('V_FILE='||v_file);
    wfile_handl := UTL_FILE.FOPEN(v_dir,'DATA_5138.CSV','R');
    LOOP
    UTL_FILE.GET_LINE(wfile_handl,S);
    C := C + 1;
    END LOOP;
    UTL_FILE.FCLOSE(wfile_handl);
    RETURN C;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN 0;
    END COUNT_RECORDS_CSV;
    if i print the values of c it show me correct result but it always return 0 can any body told me why its happening.
    thanks

    The fact that you have written this:
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        RETURN 0;means you didn't bother to read this.

  • Counting Total No.of Idocs received in BPM

    Hi Experts,
                   My scenario is " I am getting three different Idocs from three interfaces. Now i want to count total number of idocs from all the interfaces and compare this count with the one of the idoc field(Which contains the total number of idocs send from the sender) if the count matches then i have to send this idocs to the receivers."
                   I have done the configuration as follows
    1.Fork step with three branches
    2.Loop, inside the loop Receive step,Container operation step with the property Assign for counting and one more container operation step for Appending.
    3.Transformation step
    4.Send step
            While doing this i am getting individual idoc counts but i want the sum of these three interfaces count. How can i get the count of all three interfaces.
            Can you please let me know.
    Thanks & Regards,
    Purushotham
    Edited by: Purshothamm Thenepalli on Aug 5, 2008 5:32 AM

    If you want to count every time u get an IDoc irrespective of the sender, you need to use multiple receiver steps for receiving each type of idoc and then count.
    It will be almost like a collect pattern at the receiving part in BPM.
    VJ
    Edited by: VijayaShankar Konam on Aug 4, 2008 11:53 PM

  • Count total no of ip addresses from a database

    how can we count total number of ip addresses from a database using jsp
    Edited by: 863765 on Jun 6, 2011 7:26 PM

    863765 wrote:
    yes IP addresses are in database, so I need to count the total number of ip addressesIs the issue connecting to the database containing the IP addresses? Or writing the SQL to query the database to get the count of IP addresses? Also, do you need a count of unique IP's or just all IP's in the database even if there are duplicates?

  • How to count total number of records in mYSQL through JSP ??

    hi
    i want method to count total number of records in table.
    it was there rs.count() method in VB .
    But what about JSP , i used MYSQL database.
    tell me solution please...
    thanks...
    remember JSP - total record count for mySQL

    hello mr.
    i don't want ur suggestion ok
    i know that site.
    no need to give suggestion if u don't give code.
    its better to give proper reply instead of making a
    comment in forum.
    next time take care
    He was perfectly justified in that remark. I have given you the information you need, nicely, twice. But I, and noone else here is going to do your work for you. We will point you in the direction you need to be looking, but we are not going to give code. If you attempt to code something yourself, and it doesn't work, then post the code you tried, and we may make some corrections to it. Then again, with the attitude you've shown so far we probably will not. But one thing no one here will do, is do your work. Especially not for free.
    Now, if you are not willing to sit down, and look at the suggestion that has already been made, and attempt to use it. Then continue wasting your time, but go away and stop wasting our time.

  • Powershell: Count total messages to and from external domain

    Hi All,
    I'm attempting to get a count of total messages to and from our clients domains.  For example, @customer1.com 23.
    So far, I have the following code
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited |where-object {$_.EventID -eq
    Send" -or $_.EventID -eq "Receive"}
    What I'm looking for is the following:
    If the Sender or the Recipient is NOT @ourcompanydomain.com, count total messages either sent or received from the domain.  Output to csv.
    123.com, 53
    456.com, 32
    Any help would be greatly appreciated.
    Brian
    Syncronet

    Ok, so I've made some progress and now have it so I get an accurate count of total messages.  Now I need to group them by @recipientdomain.com and have totals for each recipientdomain.com.  I also need to get the output correct.  
    Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010 -ea silentlyContinue
    [long]$IntSent=0
    [long]$IntRec=0
    [long]$IntTotal=0
    $domain="extdomain.com"
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited -Eventid Send| ForEach{$IntSent++}
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited -EventID Receive |Where {[String]$_.recipients -notlike "*@mydomain.com*"}|ForEach{$IntRec++}
    #write-host ($IntSent)
    #Write-host ($IntRec)
    $IntTotal=$IntSent + $IntRec
    write-host ($IntTotal)
    $table=@"
    Domain,Messages
    $domain,$IntTotal
    $Table |set-content c:\temp\messages.csv
    Any help is greatly appreciated.
    Thanks
    Brian
    Syncronet
    Directly loading in the snap in for Exchange 2010 and 2013 is not supported.
    Please update scripts to use remoting:
    http://blogs.technet.com/b/rmilne/archive/2015/01/28/directly-loading-exchange-2010-or-2013-snapin-is-not-supported.aspx
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Rating - Play count totals question ...

    Hi,
    I'd like to transfer the Rating & Play count totals to another computer (that has hopefully the same play list).
    How do I do this?
    Thanks.

    As you probably know, the rating and playcount are not stored in the song file itself; they are stored in the library and will be lost if you move the songs separately from the entire library.
    So, to preserve them, first consolidate your library (if it isn't already) using the command File > Library > Organize Library... > Consolidate Files, and then copy the entire iTunes folder to the new machine.

  • Count total rows in database?

    Hello all,
    Is there a way to query the database for the total number of rows.... without using ANALYZE STATISTICS? (That would cause the db to sometimes use COST instead of RULE based optimization, slowing it down significantly.)
    I know I could could brute force a total row count with something like:
    spool get_total_rows.sql
    SELECT 'SELECT COUNT(*) FROM '||owner||'.'||table_name||';'
    FROM ALL_TABLES;
    spool off
    ...then run get_total_rows and manually add all the counts.
    But it just seems like there must be a cleaner way to do it.
    Thanks much,
    Natasha

    ok. here you have that information:
    ALL_TABLES
    ALL_TABLES describes all relational tables accessible to the current user. To gather statistics for this view, use the SQL ANALYZE statement.
    Related Views
    DBA_TABLES describes all relational tables in the database.
    USER_TABLES describes all relational tables owned by the current user. This view does not display the OWNER column.
    Note:
    Columns marked with an asterisk are populated only if you collect statistics on the table with the ANALYZE statement or the DBMS_STATS package.
    Column Datatype NULL Description
    OWNER
    VARCHAR2(30)
    Owner of the table
    TABLE_NAME
    VARCHAR2(30)
    Name of the table
    TABLESPACE_NAME
    VARCHAR2(30)
    Name of the tablespace containing the table; NULL for partitioned, temporary and index-organized tables
    CLUSTER_NAME
    VARCHAR2(30)
    Name of the cluster, if any, to which the table belongs
    IOT_NAME
    VARCHAR2(30)
    Name of the index-organized table, if any, to which the overflow entry belongs. If IOT_TYPE column is not null, this column contains the base table name.
    PCT_FREE
    NUMBER
    Minimum percentage of free space in a block; NULL for partitioned tables
    PCT_USED
    NUMBER
    Minimum percentage of used space in a block; NULL for partitioned tables
    INI_TRANS
    NUMBER
    Initial number of transactions; NULL for partitioned tables
    MAX_TRANS
    NUMBER
    Maximum number of transactions; NULL for partitioned tables
    INITIAL_EXTENT
    NUMBER
    Size of the initial extent in bytes; NULL for partitioned tables
    NEXT_EXTENT
    NUMBER
    Size of the secondary extension bytes; NULL for partitioned tables
    MIN_EXTENTS
    NUMBER
    Minimum number of extents allowed in the segment; NULL for partitioned tables
    MAX_EXTENTS
    NUMBER
    Maximum number of extents allowed in the segment; NULL for partitioned tables
    PCT_INCREASE
    NUMBER
    Percentage increase in extent size; NULL for partitioned tables
    FREELISTS
    NUMBER
    Number of process freelists allocated to this segment; NULL for partitioned tables
    FREELIST_GROUPS
    NUMBER
    Number of freelist groups allocated to this segment; NULL for partitioned tables
    LOGGING
    VARCHAR2(3)
    Logging attribute; NULL for partitioned tables
    BACKED_UP
    VARCHAR2(1)
    Has table been backed up since last change
    NUM_ROWS*
    NUMBER
    Number of rows in the table
    BLOCKS*
    NUMBER
    Number of used data blocks in the table
    EMPTY_BLOCKS*
    NUMBER
    Number of empty (never used) data blocks in the table
    AVG_SPACE*
    NUMBER
    Average amount of free space, in bytes, in a data block allocated to the table
    CHAIN_CNT*
    NUMBER
    Number of rows in the table that are chained from one data block to another, or which have migrated to a new block, requiring a link to preserve the old ROWID
    AVG_ROW_LEN*
    NUMBER
    Average length of a row in the table in bytes
    AVG_SPACE_FREELIST
    _BLOCKS
    NUMBER
    The average freespace of all blocks on a freelist
    NUM_FREELIST_BLOCKS
    NUMBER
    The number of blocks on the freelist
    DEGREE
    VARCHAR2(10)
    The number of threads per instance for scanning the table
    INSTANCES
    VARCHAR2(10)
    The number of instances across which the table is to be scanned
    CACHE
    VARCHAR2(5)
    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)
    TABLE_LOCK
    VARCHAR2(8)
    Whether table locking is enabled or disabled
    SAMPLE_SIZE
    NUMBER
    Sample size used in analyzing this table
    LAST_ANALYZED
    DATE
    Date on which this table was most recently analyzed
    PARTITIONED
    VARCHAR2(3)
    Indicates whether this table is partitioned. Set to YES if it is partitioned.
    IOT_TYPE
    VARCHAR2(12)
    If this is an index-organized table, then IOT_TYPE is IOT, IOT_OVERFLOW, or IOT_MAPPING. If this is not an index-organized table, then IOT_TYPE is NULL.
    TEMPORARY
    VARCHAR2(1)
    Can the current session only see data that it place in this object itself?
    SECONDARY
    VARCHAR2(1)
    Whether the trigger is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge (Y |N)
    NESTED
    VARCHAR2(3)
    Is the table a nested table?
    BUFFER_POOL
    VARCHAR2(7)
    The default buffer pool for the object. NULL for partitioned tables
    ROW_MOVEMENT
    VARCHAR2(8)
    Whether partitioned row movement is enabled or disabled
    GLOBAL_STATS
    VARCHAR2(3)
    For partitioned tables, indicates whether statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO)
    USER_STATS
    VARCHAR2(3)
    Were the statistics entered directly by the user?
    DURATION
    VARCHAR2(15)
    Indicates the duration of a temporary table:
    SYS$SESSION: the rows are preserved for the duration of the session
    SYS$TRANSACTION: the rows are deleted after COMMIT
    Null for a permanent table
    SKIP_CORRUPT
    VARCHAR2(8)
    Whether Oracle ignores blocks marked corrupt during table and index scans (ENABLED) or raises an error (DISABLED). To enable this feature, run the DBMS_REPAIR.SKIP_CORRUPT_BLOCKS procedure.
    MONITORING
    VARCHAR2(3)
    Whether the table has the MONITORING attribute set
    Try with ALL_TABLES and post if the results were zero too
    Joel P�rez

  • How to get the count of customers

    Hi all,
    We have a fact table, AR_F to which the dimensions Party_D and Fin_D are connected. Party-org_d is inturn connected to Party_d.
    party_org_D contains details of customers like Customer name and customer ID (Number)
    Fin_D contains ratings (Both -ve and +ve) of each customer.
    the rating range is as follows,
    good rating : >0
    OK Rating: Between 0 and -1.5
    Bad Rating: <-1.5
    Now i need to get the count of all customers falling in each range as separate measures.
    Kindly help me get a solution for this.
    Thank you.

    Hi,
    Try this....
    col 1
    case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end
    col 2
    case when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Good' then count(customer_id)
    when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Ok' then count(customer_id)
    when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Bad' then count(customer_id)
    end
    hope helps........

  • How to Count total number of Words in PDF?

    I am used Adobe Acrobat javascript inbuilt function getPageNumWords(<pagenumber>) it return the number of words present in specified page, but while am copy and paste text content from PDF file to MS Word, Words count given by MS Word is little bit differ, so any one know in which aspect Acrobat count the words?
    Which words count result is correct?
    Shall is go with Acrobat Words count result or MS Words count result?
    But I want to count the total number of words in PDF file (my input is PDF file) else can I go with iText?
    Words count in PDf using iText is possible?

    Word counts are likely to vary a little according to how you count. For instance, are hyphenated words one or two words? What if the hyphen is at the end of a line? Do numbers count as words? Headers and footers? Captions?
    Generally, you just accept a slight variation. If you are counting words in a professional context, i.e. where payment is per word, you probably need a contractual definition of how words are to be counted; in the absence of one, I suggest you use Word.

  • Count total of records in a cursor

    How I can to Know the total of rows in a cursor whithout pass over all them

    do a simple count(1) for the same query as in cursor...
    select count(1) into Varible
    Clauses of ur cursor;
    e.g;
    declare
    cursor c1 is select * from emp;
    a c1%rowtype;
    cnt number;
    begin
    select count(1) into cnt from emp;
    --YOUR CURSOR GOES HERE
    end;
    Riaz

  • Count total records in 2 tables

    Hello,
    I am using this query
    select count(*) from table1, table2) to get the total number of records in those 2 tables. Actually I have only 7 records in both the tables, but I get 15. What could be the problem?
    Also I need to find out another query where in I can find out which table is giving a particular record. e.g table1 has firstname,lastname and table2 has firstman,lastman. I need to know that firstname has come from tabl1 and firstman has come from table2.
    Please help.
    Thanks

    Well, if I'm not misstaken the difference between
    UNION and UNION ALL is that UNION ALL will include
    duplicates while UNION will ignore the duplicates.The UNION clause forces all rows returned by each
    portion of the UNION to be sorted and merged and
    duplicates to be filtered before the first row is
    returned. A UNION ALL simply returns all rows
    including duplicates and does not have to perform any
    sort, merge or filter. It is much more efficient.
    (Although the performance factor may be irrelevant in
    the OP's situation - the issue of duplicate rows
    isn't)And what did I say?
    Asuming the OP does not have duplicates within each
    table (when he/she would really violate relational
    database theory) Why do you assume that? Why would this violate
    relational database theory?If you don't have a primary key, it sure does. I don't have my C J Date book here, but this looks like an accurate transcript of C F Codd's twelve rules a relational database must obay: http://engr.smu.edu/~fmoore/notes/12rules.htm Look at number 2...
    there will not be any difference between the twoUNION "versions".
    That is correct. I just didn't want to change that
    part of the code ( String s1 = rs.getString(2)...)
    since the OP asked about the database query.i wasn't referring to the OP, hence the 'ps' and 'for
    anyone doing this sort of thing in Oracle' and 'if you
    tend to use the column name version of getString()'
    Yes, you are again correct. I just explained why I wrote what I wrote.

Maybe you are looking for

  • Expanding text java script

    I got a java script from a coworker that allows me to click on a button and display expanded text. The problem is, when its clicked, the page jumps back to the top of the page. Any ideas? Here is a sample of the code: <a href="#" onclick="document.ge

  • Capturing Sound played by other players

    Hi All, I am trying to capture the sound being played by other music players using my Java program. I want to record the song played over internet using my Java code. Can anyone guide me how to do it?

  • Disable row-marking in OO ALV

    Hello, I have an OO ALV where I can select all the rows of the list, but I want to disable the row-marking in some lines. For example, in a list with 10 rows, I want that the last 5 rows were not selectable, but the first 5 rows have to be selectable

  • Several Unknown Devices after Windows 7 Home Premium Reinstall

    After losing all my data trying to encrypt my hard drive I reinstalled windows from my hard drive using HP's settings in the boot menu and got some weird results. One is that my C drive now only only has 65 gb of space, so I created a new partition w

  • HT5312 How do i reset my security questions when i havent set them?

    I am being asked for security questions  to buy itunes, i have not set them in the first place. The reset email isnt sending and i cant find an email to ask apple.