Counter on Key figures

Hello,
I have a report which shows the late deliveries. The no. of days late comes as a key figure. I want a report where it shows the count of no. of deliveries which are late by <10 days or greater than 10 days.
Basically its like a counter on the Keyfigure. So my report would look like
Late by 1 - 10 days - 20
Late by 11- 20 days - 30
Any inputs would be highly appreciated and rewarded.
thanks,
KK

Hi KK.
This can be solved at query level. I.e. late by 1 - 10 days:
('KF'>0 AND 'KF'<=10)*1
The expression 'KF'>0 will if true be 1 and if false 0.
Hope this helps.
BR
Stefan

Similar Messages

  • BEx query: count unique key figure values

    Hi
    I need a little help with a query. I need to count the number of unique key figure values. Se example;
    Data:
    Employee1 - 2
    Employee2 - 3
    Employee3 - 2
    Employee4 - 1
    Employee5 - 2
    Employee6 - 1
    Employee7 - 2
    Wanted output:
    1 - 2
    2 - 4
    3 - 1
    What kind of options do I have?
    Thanks
    Mike

    I would create a new characterstic for the same key figure and placed in rows and count in columns.
    and second approach would be , create condition with customer exit and write the logic to count the unique values.
    This is just a direction to move forward with the assumption that you are good in using variables and wirting logic in ABAP.
    Thanks,
    Sukhi

  • How to do a Count for Key Figure?

    Hi,
    I have a KF which gives me results in %. For each of these results, I need to compare if the result value is less than 80% or greater than 120%. If it lies b/w 80% -120% then I need to display a count '1' & '0' otherwise.
    Could you suggest how do I go about doing this?
    Thanks in advance!

    Create a CKF on the KF and use boolean to get 1 & 0.
    (KF<80 OR KF>100)0 +(KF >=80 AND KF<=100)1
    This should do it
    Hope it helps.
    Bhargava
    Message was edited by:
            Kumar Bhargava
    Message was edited by:
            Kumar Bhargava

  • Count the number of business partners on a non-cumulative key figure

    Dear experts,
    I have a problem. We have an InfoCube in BW in which the Activity Journals are loaded every day. In this Activity Journals it is registered that a Material was listed (available) at a customer (value 0 or 1).
    We have a non-cumulative key figure MXW_LISTN with inflow (MXW_LISTI) and outflow (MXW_LISTO). In time this key figure receives +1 or -1 for a customer, material combination.
    I want to use MXW_LISTN in the query in a specific way. The key figure on itselve tells me how many listings there are. However, I want to know how many business partners there are with a listing.
    I was thinking about an exception aggregation on MXW_LISTN with reference characteristic 0BPARTNER and "Count <> 0". BW however refuses to do so and only lets me do simple aggregations such as AVG, MIN, MAX etc.
    Can you think with me and come with an proper solution to count the number of business partners with a listing?
    Your help is very much appreciated and rewarded!
    Best regards, Hans de Klein

    Would anything with virtual key figures be a solution? Please help me out!
    Best regards, Hans de Klein

  • BPMon: Table Entry Counter Key Figure

    Hi guys.
    When using the key figure "Table Entry Counter", if one of the fields in the table is a datestamp, is it possible to set a dynamic date field on this? E.g. would it be possible to only look at the last 2 weeks?
    Thanks,
    John

    Hi John,
    I think you got your answer quite some time ago via OSS message. But in order to benefit the community I also want to provide an answer here. There exists a Setup Guide for the Table Entry Counter under http://service.sap.com/bpm > Media Library > Technical Information in which it is explained how to realize dynamic dates.
    You can also follow the direct link http://service.sap.com/~sapdownload/011000358700000767792010E
    Best Regards
    Volker

  • 1rowcount & case counter ( key figures)

    Hello Experts,
             I have an object called 'case counter' in my ODS which is numeric 1 in the key figures category. But I have an extra field called '# of records' shown in my ODS under Key figures list. I think it is SAP defined '1ROWCOUNT'. I am not sure if I need to keep both case counter and # of records becoz both of them give the same result. My concern is we use the case counter in all our cubes and ods's and we are sceptical in not using it in the ODS. But please can you just explain what is best in my situation.
    Thanks,
    Anjali

    Hi Anjali,
    You do not need your counter even if you are loading data from the ODS to cube, because in the update rule of the cube's keyfigure, you can set a constant value of 1.
    But there might be a scenario that neither you nor me can think of now that will need the counter. So you might as well keep it

  • Sort the Key Figure and put a count on it

    Hi Experts,
    I have a  situation where I have to sort the value of the Key Figures in ascending order and put a count on them.
    Kindly elaborate me a little on this.
    Thanks in advance,
    Kannan

    Hi Kannan,
        If you want to do this setting at the Query Designer level, then select the Properties section for the
    desired Key figure say K1.then select the "Calculations " tab.  Under the Local calculations for "Calculate Results as" select "Counter for all detailed values".Save the query.
    Open the query (say) at Bex Analyzer. From  the context menu for the key figure K1, select "Properties"-->then under Sorting tab select the required order.
    The options mentioned above, i.e  "calculations" and "Sort" is available on web too in the context menu for the key figure.
    The above mentioned setting wil be a display setting>You can modify it as per your requirement at Query Designer.
    NOTE:
    If your requirement is such that K1, should always display the counter , then while creation of the K1 itself , you can select the Exception Aggregation of Type "Counter(all values)". Then, the setting will be permanent.(design time)
    Hope the information helps!
    Best Regards,
    Akshata
    Edited by: Akshata Shenoy on Jun 2, 2009 12:25 PM
    Edited by: Akshata Shenoy on Jun 2, 2009 12:27 PM

  • Calculating count of orders using virtual key figures

    Hi All,
    In my report, i need a counter for the number of distinct orders.
    1ROWCOUNT didnt work for me as i want the count of distinct orders alone.
    I am planning to use virtual key figure for this..
    However, i donno how to code this in ZXRSRU02 and ZXRSRZZZ.
    Any help on this would be great!!
    Thanks!
    - Arun KK

    Shana,
    I dont understand your question.
    I'll give an eg.
    this is how the cube is.
    Order | Desc | Location
    101  |   'X'  | loc01
    101  |   'X'  | loc02
    102  |   'Y'  | loc01
    103  |   'Z'  | loc01
    102  |   'Y'  | loc02
    in the report, i need the o/p to  be.
    Order | Desc | count
    101  |   'X'  | 1
    102  |   'Y'  | 1
    103  |   'Z'  | 1
    i cant use 1rowcount as that counts each row and not the service orders.
    Hope this answers your question.
    Please let me know if there is a solution for this.
    Thanks!
    ~ Arun KK

  • How to filter Key Figure according of "Counter"

    I am on BI7 now, I need to set a filter in query, according the counter, means that there are 37 lines in the query, but user only want to show the buttom of 20%, means after sort according the key figure, only show the record from buttom, means number 37 record to 37*0.2 = 7.4, means only show 8 lines from buttom after sort, I can not find any condition fit this, can any one help?

    Hi,
    You have the option of selecting Top N hits in your query May be you can try something out there.
    Regards,
    Pramod

  • The table name or tcode to count the number of Dimensions and Key Figures

    Hi all,
    Do you have an idea about the table name or tcode to count the number of Dimensions and Key Figures of an Infocube WITHOUT installing the cube from Business Content?
    Thanks in adv.
    Ajay

    Hi,
    You can't do that because there's no active table in the system for the Business Content since it hasn't been installed yet...
    One thing you could do is go to the Business Content Tab, select "Infoproviders by InfoArea" on the left side, look for the Cube or DSO you want to check, right click on it and select "Display Description".
    On the window that opens you'll have a list of all InfoObjects and Key Figures. You also have the option to Display it as Start Schema, where you can see the Dimensions, etc.
    Hope this helps.
    Luis

  • Counting Key Figures above a threshold

    HI Experts
    I need to count a calculated key figure only when is above a threshold:
    DIV | CONTRACT | Calculated CONSUMPT
    01     101               40
    01     102               30
    01     103               50
    02     201               20
    02     202               40
    02     203               10
    The output should look somethinhg like
    DIV   |  BandWithConsumpt  | No. of Contracts
    01        Greater than 30           2
    02        Greater than 30           1
    The number of records is huge (>65536) so conditions is not an option as far as I know.
    I will appreciate your help
    Thanks,
    Carlos

    Hi ,
    See below help doc to count the occurence of a characteristics.
    [Count the occurrences of a characteristic relative to one or more other Characteristics|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7e58e690-0201-0010-fd85-a2f29a41c7af]
    and  Create a condition with the required threshold.
    Thanks
    Sundar

  • Counter Key Figure

    Hi
    I have created a counter key figure for my Cube and assigned constant 1 in the transformations.
    The thing is I am seeing Key figure value =2 in cube and not = 1 for each row .
    I checked the PSA and I see that 2 rows of each set of unique data . So I am not able to figure out why there are 2 rows for each unique data with only different Datarecord number.
    and How to define the counter Key Figure.
    Thanks in advance.

    Hi,
    It sounds like you defined your counter correctly, but it also sounds like you are getting doubled data coming in.  Look at your source and figure out why you are getting doubled data.
    On the converse, you can go into your query and create a global calculated key figure on the counter variable.  After you do this, in the properties section of the calculated key figure ... choose the enhance button at the bottom and choose summation for aggregation and exception aggregation of Count all values <> 0 for a characteristic that makes sense.
    Brian

  • KEY FIGURE: Effective purchase order value & K.F "No. of Purch.Orders"

    Yo my fellow Gurus,
    Got a problem, when executing listcube on the Info-Cube 0PUR_C01 - I see the data/amounts in the column for "Effective purchase order value" / 0ORDER_VAL. But when running the query with the Key Figure I just get "0"
    I tried the option of adding the Process Keys not allocated in the Routine list of keys, yet still nothing has popped in the query, and heres the routine after  additonal keys added:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    INCLUDE RS_BCT_MM_UPDATE_RULES.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-ORDER_VAL
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or     "Bestellung
        COMM_STRUCTURE-PROCESSKEY = '011' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '015' or
        COMM_STRUCTURE-PROCESSKEY = '005' or
        COMM_STRUCTURE-PROCESSKEY = '025' or
        COMM_STRUCTURE-PROCESSKEY = '041' or
        COMM_STRUCTURE-PROCESSKEY = '051' or
        COMM_STRUCTURE-PROCESSKEY = '061' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '021' or
        COMM_STRUCTURE-PROCESSKEY = '004' or       "LP
        COMM_STRUCTURE-PROCESSKEY = '014' or
        COMM_STRUCTURE-PROCESSKEY = '024' )
        AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
        AND COMM_STRUCTURE-ORDER_VAL <> 0.
        perFORM LOC_CURR_CONVERT
               USING    COMM_STRUCTURE-ORDER_VAL
                        COMM_STRUCTURE-DOC_DATE
                        COMM_STRUCTURE-ORDER_CURR
                        COMM_STRUCTURE-LOC_CURRCY
                        COMM_STRUCTURE-EXCHG_RATE
               CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
    else.
        RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    This seems to be also the issue with my other Key Figure "No. of Purch. Orders" except here it the just comes up blank / 0 . This is to some the number of pos per plant for the month. So it's not storing anything but running via an interface and then with the aid of the routine loading the count into the cube:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_HDR
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-NO_PUR_ORD
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      if COMM_STRUCTURE-HDRPROCESS = '01'         "Bestellung
         AND COMM_STRUCTURE-no_hdr <> 0.
    result value of the routine
        RESULT = COMM_STRUCTURE-no_hdr.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
      else.
        RETURNCODE = 4.
      endif.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Please advise the way forward.
    Thanks,
    Ishaam

    what do u want?

  • How to ignore blank/null key figure value in BI Queries

    Reports on Multiprovider - we see some cells of a Key figure as blanks. These blanks are interpreted as zeros by the system and calculated accordingly resulting in incorrect values. As per our requirement, we need a count of all hard/real zeros only, not the blanks. For example, if there are 10 rows of which 6 are real zeros and 4 are blanks - our count should be 6 and not 10.
    How to ignore the blanks in BEx queries please?
    Thanks for your help.
    Upender

    Rakesh,
    It is not possible to find a pattern because the report is on a MultiProvider with 2 InfoProviders- Purchasing documents DSO and Material Movements InfoCube.
    Every Purchasing Document has several materials associated with it. These materials are compared with materials in Materials Movement. Not all materials in Purchasing Document are found in Materials Movement. For those Materials found in Materials Movement, the Quantity is obtained. For these found rows, the correct value is showing up - if the quantity is zero, it is showing in reports as zero. If the material is not found in Material Movements then Quantity shows up as blank values.
    My requirement is ignore such blank quantities and not count them. Only Quantities with 0 values should be counted. Currently both blanks and zero values are counted showing inflated count.
    Thanks,
    Upender

  • Key Figure Aggregate in Bex Query

    Hi Gurus
    I am using BI7.0; but 3.5x BEx tools
    I am loading 6 fields from a flat file.  I am loading data for tickets.  I have create an InfoObject that counts the number of tickets.  No problem.  Also I also have key figures that I am assigning the same value to all Charactersitics: 10,30 per ticket.
    The Key figures are (Sum) with a Summation aggregation type. 
    In my Query, the 10,30 aggregate up based on the number of tickets (characteristic) that are available.
    Question:  How do I remove/stop my key figures from aggregating up (sums) the values of 10, 30 based on the charactersitic?  I want only 10, 30 to be present regardless of the number of tickets (constant value applied to the key figure).
    Should I change my aggregation type?  If so, to what?  I see a number of options, such as Last Number, No aggregation, etc
    Thank you

    I found a solution to my requirement.

Maybe you are looking for

  • How to generate a PDF document from ABAP program

    Hi experts, I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT. A pdf document is successfully created, but unable to open it because of som

  • SCOM 2012 R2 HA design but using SQL 2014 Standard edition

    Hi All, I want to deploy SCOM 2012r2 with a HA design (but have constraints!) Plan is two management servers with all roles to each (fresh deployment so 2012r2 RU5) SQL servers need to be 2014 standard edition due to licensing and cost constraints. D

  • XML & OC4J

    Hi, I am having a lot of trouble with the xml parser in oracle, i have an app that uses JDOM and would like to continue using this, despite having followed the article by Jason Hunter i still receive exceptions when i try to run the code!!! i am usin

  • SQL History behaviour

    Can we have an option to switch to the JDeveloper behaviour for SQL History please ? I am getting p'd off with Replace/Append in Raptor instead of just dbl-clicking on the line of SQL I want and having it replace whatever's there.

  • HT1222 My Computer memory board was replaced now itunes dont show mu  music that was in itunes but are on my i pod how do recover my music list

    i had a music list on i tunes now i have none i had to replace memory board after replacement i loss my music i had how do i recover my music