Count using a Key Figure

Hi All,
I have an issue using COUNT in a query. The issue is that I have to count the no. of material based on a certain KF, say sales. If the sales amount or value is non-zero then the material has a count of 1. If the sales amount is zero then the count is 0.
Now, I need to display the no.of materials in a particular period with sales in that period. Could you please let me know how is this possible?

Hi Bjorn,
When I set the Maeterial to 'No Display', I am still getting individual rows for all the material in addition to the overall result row. For example:
Count of Material 1
Sales Amount     10
Count of Material 1
Sales Amount 30
So on and so forth...
In addition I get the overall Result row,
Count of Material  2
Sales Amount 40.
Please advise as to how to display just the overall result and not the individual rows.

Similar Messages

  • 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

  • Defination and use of key figure in copa

    dear experts,
       i'm new to co-pa.
       can anyone explain to me the defination and use of key figure in copa??
    many thanks
    mu

    Hi!
    Generally you use key figure for defining calculated values for use as tracing factors for  cost center assessment to COPA.
        You can use for this t.code KE2K as define calculated values as reference values.
    For Ex.
    Key Figure R1 contains below value fields through formula :
    R1 = ERLOS + VV00 + VV01 + VV02
    where ERLOS = Revenue
    VV00 = Exports Revenue
    VV01 = Domestic Discount
    VV02 = Exports Discount
    So, this key figure you can use as a base for tracing factors for cost cetner assessment to COPA.
    Hope it will clear to you. Pls ask for any further query.
    Thanks & Regards,
    Taral Patel

  • Using Virtual Key Figures/ Characteristics is possible to use in InfoSets

    Hi All,
    Is it possible Using Virtual Key Figures/ Characteristics is possible to use in InfoSets?
    I have tried all the possibilities using the BADI implementation RSR_OLAP_BADI without success.
    The VKF / Characteristics works fine when it is being used with a query based on the ODS however it is not populated when i am using the infoset. Moreover i have used the code for InfoSet as well it is not working.
    I would appreciate any help in this regard.
    Regards
    Noor

    Hi PV,
    r u sure about that, as i have tried all sort of permutation and combinations for using the same in RSR_OLAP_BADI without any luck.
    I have the got felling about the same however if you look into the following SAP note it puts me into doubt.
    Note 657690 - Virtual characteristics and key figures in InfoSets
    Note 618738 - Virtual characteristics or key figures and InfoSets.
    It describe about using the RSR00002.
    Many thanks for the information.
    Kind Regards
    Noor

  • Can i use the key figure total delivery time in days in rows and how is can

    Dear all,
              Can i use the key figure total delivery time in days in rows and how is can.but all the key figures r used in rows but i cannot use in column.i want bothin rows and in column  at a time ,can this is possible,and how.

    Hi,
      yes you can.You will have to use structure in the row.
    Right click on the row and create a new structure.
    In this structure you can add key figure.
    Maximum number of structure a query can have is two
    Please assign points if it helped you.
    Regards,
    Senoy

  • Use of key figure 9ADFCST in SNP

    I am using APO V5.1.
    In particular I'm using SNP heuristics, and we have forecasts in the standard key figure 9ADFCST.
    As I understand it, this key figure contains the 'unconsumed forecast', and so is the original forecast (from APO DP) minus open sales orders and minus sales order despatches.
    I want to be able to distinguish between the situation where 9ADFCST is zero because the original forecast is zero (and we have no sales orders), and where 9ADFCST is zero because it has been fully consumed by sales orders/despatches.
    Any advice on this would be appreciated...

    Hi,
    I would recommend that you do not touch the 9ADFCST Key Figure and add a new Time Series KF for storing the original forecast (let's say CORFCST).
    When you release forecast from DP to SNP, in a next step, also copy your DP forecast to CORFCST using the program /SAPAPO/RTSCOPY.
    So, use original forecast KF CORFCST to see the values of the forecast that came out of DP, while 9ADFCST will tell you how much unconsumed forecast remains. When both values are zero, it's clear that your forecasted value was zero, otherwise, you could find out the original forecast using the KF CORFCST.
    Of course, other option is to go to forecast tab in RRP3 (product view) and check the consumption situation (how much of the forecast is consumed vs how much was available initially).
    Hope this helps.
    Thanks - Pawan

  • How to use existing Key figure strecture ??

    Guys,
    I am creating a new query from the existing query on the same Multi provider.
    So, i created a copy of the query using RSZC and gave a new technical name. But the problem is both the query has the same Key figure strecture. and i have to modify that strecture in the new query. If i am not wrong then if i do any changes then it will affect all the queries ...right ?
    So, for that in my new query i did right click on strecture and did "Remove Reference"  and saved it.
    Can i modify now ??? i am not sure, if i do some changes in the new query , but both the key strecture will have same techinacal name.
    will it modify everywhere? or should i copy that key strecture and give diff. tech. name and then do changes ???
    please giveme  your precisios thoughts ....
    thanx

    experts ! i m stuck !!! need help
    i created a copy of my query using rszc, then did remove refrence and then saved the strecture with diff. tech. name.
    Now, in my new query i have a same strecture from old query . but with diff. tech. name... so basically 2 diff. strecture.
    if i do where-used list in my new query strecture, i dont find any refrence...so thats fine.
    But, the problem is , now i made some changes to the new strecture, and wanted to remove some old stuf ( which was came when i did copy ). If i right click and do remove, its giving me an error...."Element cannot be deleted because it is still being used. "
    But where ???? in where-used it says " No refrence to external queries Found"
    whats the problem ??
    Thanx in advance

  • APO DP - use of key figure change mode 'Redisaggregate'

    I am using the macrobuilder in APO DP V5.
    Here one can use a 'redisaggregate' change mode for a key figure.
    But what is a practical example where this could be relevant and useful?
    Thanks,
    Bob Austin, Atos Origin

    Srinivas,
    Thanks for this.
    I now understand the concept.
    But what does the 'redisaggregate macro' look like?
    Suppose I have key figure X with disaggregate key figure APODPDANT.
    I have a fcst run at high level, and I recalculate APODPDANT.
    What is the structure of the macro to now apply the new APODPDANT values?
    Is it something like key figure Y (change mode = redisagg) = key figure X?
    Thanks,
    Bob.

  • Problems using virtual key figures

    Hi experts,
    I have got 2 questions regarding virtual key figures, by using the OLAP BADI
    1. Is there a chance to get the variable values out of the variable selection screen in the BADI implemtentation? If so, how?.
    2. In the compute method the assign does not work because the Attributes (p_kyf_ZIMCREDAY, p_cha_0material,p_cha_0calday)  are 0 all the time.
        How does the attribute get a correct assignment to a component name? See my coding of the define and compute method below.
    Thanks and Regards, Mario
    IF_EX_RSR_OLAP_BADI~DEFINE
    DATA: l_s_chanm TYPE rrke_s_chanm,
    l_kyfnm TYPE rsd_kyfnm.
    FIELD-SYMBOLS:
    <l_s_chanm> TYPE rrke_s_chanm.
    CASE i_s_rkb1d-infocube.
    WHEN 'ZD_IMC001'.
    l_s_chanm-chanm = '0MATERIAL'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    l_s_chanm-chanm = '0CALDAY'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    APPEND 'ZIMCREDAY' TO c_t_kyfnm.
    ENDCASE.
    IF_EX_RSR_OLAP_BADI~COMPUTE
    FIELD-SYMBOLS <fs_ZIMCREDAY> TYPE ANY.
    FIELD-SYMBOLS <fs_material> TYPE ANY.
    FIELD-SYMBOLS : <fs_calday> TYPE ANY.
    ASSIGN COMPONENT p_kyf_ZIMCREDAY OF STRUCTURE c_s_data
    TO <fs_ZIMCREDAY>.
    ASSIGN COMPONENT p_cha_0material OF STRUCTURE c_s_data "p_cha_0material
    TO <fs_material>.
    ASSIGN COMPONENT p_cha_0calday OF STRUCTURE c_s_data "p_cha_0calday
    TO <fs_calday>.

    Regarding 1.
    I checked in debugging the variable I_TH_SFC in the initialize method, but there is no information regarding the selections in the variable popup.
    Can you please explain in detail how to access the variable values.
    Regarding 2.
    I changed l_s_chanm-mode to rrke_c_mode-no_selection according to your recommendation.
    Unfortunately it´s still the same. The attributes still does have the value 0. Therefore the assign does not work correct.
    The attributes are defined with type i. But the component names are like 'K____132'. Is this the cause of the problem?
    Thanks, Mario

  • Getting error while trying to use restrcted key figures in bo, please help

    there is query in the BW on which the query is developed with some restrictive key figures
    when we import this query into bo all fine
    but when we tried to use these restricted key fig i am getting this error
    there no problem of importing all other queries only on this cube, the quereis on this cube
    i got error like this.. ALL IN THE BOX
    web intelligence
    X      Query 1 - ITLT Dashboard-Group Cost & Category (HFM)
             A database error occured. the data base error text is : The MDX query SELECT
             [Measure],[ 4L93.....
             COLOUMNS,NON EMPTY HIERARCHIZE (UNION ([Z_S_FUC
          INCLUDING[OFISCPER3].[001]failed to execute with the error unknown error, 9WIS 10901)
                                             CLOSE             HELP

    I am moving this post to the Webi forum as the issue seems to be related to webi using data from BW.
    The OnDemand forum is specifically about the crystalreports.com and bi.ondemand.com applications.
    Cheers
    Steve

  • Calculated Key figures using different key figures

    Hi All,
    I want to create a calculated key figure based on Actual and Plan.Actual values are coming from InfoCube,Plan values are loaded from Excel sheet into different key figure in another infocube.I've created a MultiProvider for these Cubes.Now I want to find the difference between plan and actual.So I created a calculated keyfigures based on the key figures.But the Query is giving error ..
    Then the connection terminated..
    Let me know how to do..
    Raji

    What is the error you are getting?
    First do this.
    In the query, filter on only 1 infoprovider. Check the KF's and see if correct and if you get the error. Then, do the same thing, for the other infoproviders. Once you get no errors that way. Remove the filter. See if the KF's are ok and no errors. Then do your calculation.
    Also, make sure in the definition of the KF's, you are filtering each on the right infoprovider. (For instance, KF1 has a filter on infoprovider1 and KF2 has a filter on infoprovider2.)
    hope this helps!
    /smw

  • Use of key figure based on period

    Hello All,
    I have 2 key figures in my multiprovider, e.g. Actual Amount and Budget Amount.  I need to display one of the key figure based on period.  Reports have January to December columns.  Now, if current period is October, I have to display Actual Amount from January to October.  For future periods i.e. November & December, I need to show Budget Amount. 
    Can anoybody please provide a solution for this?  How should I proceed?
    Thanks and Kind regards,
    Ajay

    HI Ajay
    Looks like you are creating a Capital Forecasting report. In order to show amounts period by period what you need to do is
    - Create one key figure for actual amount which might be based on 0Amount key figure with Debit/Credit indicator as S. (If this is not the case then please do so according to your requirement)
    - Create one key figure for Budget amount (according to your requirement)
    - Create one customer exit "Formula" variable called actual indicator. This variable will be populated with a number of 1 to 12 for each record in your cube based on the user entered month. i.e. if user enters October. assume your cube has 12 records one for each month the first 10 records will be populated with 1 and the records for Nov and Dec will be populated with a 0.
    - Create one customer exit "Formula" variable called Forecast indicator. This variable will be populated with a number of 1 to 12 for each record in your cube based on the user entered month. i.e. if user enters October. assume your cube has 12 records one for each month the first 10 records will be populated with 0 and the records for Nov and Dec will be populated with a 1.
    - Create a calculated key figure that is defined as (Actual Amount)Actual indicator + (Forecast Amount)Forecast Indicator.
    - Create twelve restricted key figures with the CKF created in the previous step restricted with the month (Jan to Dec)
    - Add the above created twelve RKFs in the query.
    Regards,

  • Calculate count of zero (key figures)

    Hi Friends,
    The output of the query is as follows:
    Row
    Group
    Sub group
    Column
    No. of incidents
    Processing time
    Characteristics are placed in row and keyfigures in column. There is an additional characteristice "team" which is not displayed in the report.
    Now i wish to count the number of incidents for which the processing time is zero and also with the restriction of team A and team B.
    I am able to count the number incidents with processing time zero. But able to restrict this to particular team.
    Regards,
    Surjit

    What I meant to ask is, time is recorded by name level right?
    If one team can have 5 different names and out of those 5 names, 3 of them have time as ZERO and 2 of them dont have time ZERO. When you set the exceptiona aggregation, you will get 3 because calcualtion is done at name level, but you can not perform the exception aggregation at team level because that will be performed on the summation of all the times from all 5 persons of that team, which will not be ZERO.
    My same question was, if you have 3 teams under sub group, how do you want to see the number in the report.
    Row1 Row2 Row3 Col1 Col2
    Grp  Sub Grp  Team1 x  x
    ____________Team2 x x
    This is not possible without having team in the report. Either you sum them up, but the team level calcualtion it self is wrong, so it really doesnt matter if you add them up at sub group level or not.
    - Danny

  • 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

  • How to use Restricted or Calculated Key figure with Characteristics?

    Hi,
    Query has characteristics 'Indicator' which has values  'X' and 'Y' depending this value, the Key figure Quantity(which is always +ve) has to be shown on the report either as -ve or +ve.
    Do I use Restricted Key figure if so, how? Or can I manage with a Calculated Key figure?
    Thanks,
    Kamala

    Hi Kamala,
    You can create 2 RFKs each in which you are restricting the KF with char value X and Y. For the one that needs to be -ve, create a CKF with this RKF and multiply it by -1 in the formula. Then you can create a new CKF that will add this CKF and the other RKF.
    Hope this helps...

Maybe you are looking for

  • Layering and locking a h.264 movie on top of a flash file

    Let me start by apologizing. My Flash skills far outdo my DreamWeaver abilities, so I'm pretty new at the program. I have run into a problem that has forced me back to DW and that is for the video quality I need, I have to use Apple's H.264 codec; ho

  • Using ORDER BY in Oralce 7.3.x

    Hi, I need to create a view using ORDER BY cluase in Oralce 7.3.x. (I guess ORDER BY Clause is not supported in Oracle 7.3). Please Let me know any workaround for this. Thanks in advance. -Gopi

  • How to create a measure for COUNT and compare year-to-date/last year?

    Hello expert, I have gone through the Oracle by example tutorial for creating the repository. However, I can't find out how to create a measure to display the COUNT (sequence ID). I tried the Aggregation function on the sequence ID on the Fact table

  • Time zone and displayed time

    Hello experts, I see that in BW (or R/3 in general) there are many 'times' eg. system time, user time zone setting etc. Does anyone know what setting controls what time is displayed in the BW monitor? My screen shows very weird timing which is not tr

  • Email/iTunes account name change

    How do I change the iTunes account/Apple ID that backs up my iPhone?  The email address has changed and I can't find a way to redirect it.