Filter query on Key Figures

How can I filter a query based on Key Figures? When I use conditions, the results totals don't change. I need the results to reflect the filtered data.

Angie,
There is no standard functionality to achieve this, but you can do it using formulas.
To check the problem:
E.g. You have
Material  Qty  Value
A           1      100
B           2      300
C           4      1000
Result    7      1400
You want to be able to filter out Materials with Qty less than 2 so you are left with just Materials B and C and the result shows Qty 6, Value 1300.
Create a formula, say 'QtyH'.
The formula detail should be: Qty > 1
This formula will display 1 for Materials B and C, Zero for Material A.
Create a second formula, say 'Qty Filtered'.
Formula detail needs to be QtyH * Qty.
Change Calculations tab to Calculate Results as Total.
This formula will display Zero for Material A, 2 for B and 4 for C.
Result row will show 6.
Repeat for the Value KF.
To simplify this you can actually combine the logic in 'QtyH' and 'Qty Filtered' into one Formula. See SAP Help under Defining New Queries; Defining Formulas, Boolean Operators
Also, if instead of QtyH being Qty > 1, you use a Formula Variable, you can give users the option to specify what filter level they want.
E.g. Qty > 'MyFormulaVariable' where the formula variable is created as Manual Input/Default Value.
Hope this helps!

Similar Messages

  • Query Designer - Key Figures on the Rows

    Hi experts,
    I inserted in a query the key figures into the rows.
    I would like to see on the report the "KEY" of these key figures and not the "TEXT", but I can't find a way to do that.
    Can anyone help me?
    TIA
    c.

    Hi,
    I developed the couple of reports but iam able to see the text in char and can u tell me where is  the option to see key and text for keyfigure.if not is not theere explanin little bit and busines requirement
    would like to see on the report the "KEY" of these key figures and not the "TEXT", but I can't find a way to do that.

  • Long text problem in BW query and Key figure name

    Hello
    We're using SAP BO 4.0 (IDT) and SAP BW as a datasource. Maybe someone knows:
    1. How to change the name of keyfigure, which now appears as Formula 1, Formula 2 etc. In BW every single key figure has it's own name Sales, Purchases etc. What I'm missing here?
    2.As you well might know every single char infoobject has it's own Long\Short\medium which now appears as an attribute. When I choose multiple Long definitions then the execution of a BEx query fails with 'Inconsistent answers'. In Universe Designer we can change the objects name, but how to proceed here. Do I need to change something on a Bex query level?
    I'm well familiar with SAP BO, but due to lack of experience in SAP I'' ve hit astumbling block with these 2 things> Any assistance would be more than welcome
    Thanks in advace

    Hi,
    for (1)  - that doesn't sound right...   i think your KF are calculated KF (CKF)  possibly with a formulae variable .. or something, which is supposed to populate the name, based on a user response ? 
    Or maybe you've got non-unique KF descriptions, and this is some system imposed nomenclature?
    for (2)  i'm not so sure, but you may have to change the infoobject text setting, globally, in RSA1.   webi won't like non-unique labels if the keys are different.. How does it look with the default 'key and text' (medium) setting?
    yes you can change the characteristic display properties in Bex query designer, but i have a funny feeling that it doesn't get consumed by webi over that API.  (it's native OLAP stuff for BEx really...)
    Good luck
    H

  • Bex Query calc key figures in Crystal report not showing technical names.

    Hi,
    I have created calculated key figures in a BEx query for which the data comes from a SAP BW cube. I have assigned each of the calculated key figures a proper technical name which I expect to see when I bring it to crystal report. When I bring that query in Crystal as a data source the calculated key figures show a wier network id names instead of the technical names. I am having a problem in using those wierd technical name in my report and my formula's as I am not able to identify what is what.
    Please urgent help requested.
    Thanks
    Mahendra

    I dont have an account on such website. I will explain u the problem in detail.
    When I create a calculate key figure in SAP BEx query designer I assigned a technical name to it, a meaningful one. In my case one such example is Actual_revenue is the name that i have assigned and the description is Actual revenue. When I create a crystal report from it and in that report if i create a formula.
    I get this {ZIC_COPA_Z_SALES.[Measures]-[25V1KYL4VE92X0T4OMHVYM90V]}
    If u see it its a wier 25 digit name.
    Instead of this I want to see
    {ZIC_COPA_Z_SALES.[Measures]-[ACTUAL_REVENUE]} which is what I have given in the query. I am using the SAP BW MDX driver to connect to Bex query.

  • Query with key figures on separte lines

    Hello bw experts.  I have a query question.  I am building a query with several structures going down the left side and I want two sets of key figures going across (jan through Dec).  That is easy but what I cannot figure out is how to get key figure 1 to be on line 1 jan through dec and key figure 2 to be on line 2 (jan through dec)  I want key figure 1 to show on the line with plan and key figure 2 to show on the line with actual
                     Jan  Feb  Mar  Apr  etc. etc.
    plan      
    actual
    Thanks in advance for any and all help
      Jim

    Hi,
    When you go for the Cell Editor option, this particular scenario would be pretty easy to achieve and apart from why don't you try for putting the month field in Column and the Plan & Actual Structures in the Rows.
    Regards,
    Mani

  • Query desginer Key Figure and Selections

    Hi,
    I have the following requirement:
    1. I have a structure in the rows part og the QD.
    2. Now, there are 5 selections created under that structure.
    3. Each selection has 2 more Key Figures added to them.
    Say, it will look as follows:
    Structure 
      |--Sel1
           |----
    KF1
           |----
    KF2
        |--Sel2
           |----
    KF1
           |----
    KF2
    Can you give any ides how I can do this?
    Edited by: anjana banerjee on May 21, 2009 9:58 AM

    What is meant by selection here? If you mean selection as characteric then for your information you can only create 2 structures in QD. one for characteristc and one for KF
    Edited by: Shailesh Naik on May 21, 2009 5:26 PM

  • FI report - query on key figures

    Hi all,
    I need to develop a FI report where I have GL a/c in rows and period to date and year to date balances as the key figures. Report should look like:
    GLa/c--Period to date balance-----year to date balance
    1--1000--
    2000
    2--400--
    1000
    3--600--
    For GL a/c 1 and 2, I need to display both key figures but for GL a/c 3, I only need period to date balance since it is a P&L account. Basically, for all GL accounts in my system, I need to display year to date balance but the ones in range 400000 till 999999, I need to display period to date balance, since these are P&L GLs.
    How can I acheive this?
    Thanks,
    Nitika

    For your "year to balance" key figure create a RKF and restrict GL account with exclusion of 400000 till 999999 range along with your key figure.
    This should make it display 0.
    Hope this helps.

  • How to filter rows according to calculated key figures in cube?

    in my cube , i use V3 update for scheduleding lines of sales items.For example , in last delta update , valid row is last column ,other two rows make zero each other for key figures but i dont want to display first two rows in Bex.i want to get rid of these rows.because of not deleting previous data in cube, how to discard the rows , can i filter by calcuated key figures in query analyzer (like not display if sum of key figures zero)   
    Doc_No       Doc_Type   Reject_St          Item_No     Net_Price(Key_Fig)     Total_Pric(K_F)
    0002207615    TA           99               10        17,000             295.630,00
    0002207615    TA           99               10        17,000-            295.630,00-
    0002207615    TA           04               10        17,000             295.630,00

    if you do compression with <b>Zero Elimination</b> your problem will be sloved.
    or
    In the calculated Keyfigure, set to After Aggregation.
    Nagesh Ganisetti.

  • Query on 0IC_C03 with key figures 0valstckqty and 0valstckval

    Hello Gurus,
    I want to make a query on  0IC_C03 with key figures 0valstckqty and 0valstckval for a single month eg October 2011. I have 0plant in rows. The problem is that I just see the key figures for planst which have movements in October 2011.
    I dont want choose all months in global filter to get key figures for all plants.
    How can I solve this problem?
    Jesper

    Jesper-
    You're looking at a "Transactional" info cube. That means that the query you create will ONLY provide data for a selected period in which data exists. Plants with no movements will not appear. That's how it's supposed to work.
    Now... you can create a hidden selection in your columns. For example:
    First column (hidden)... 0valstckqty + 0valstckval. No other restrictions
    Second column (visible) 0valstckqty  restricted to the date range of interest
    Third column (visible) 0valstckval restricted to the date range of interest
    be sure to NOT suppress Zero rows.
    Plants that never had a transaction will, however, not appear at all. The query will also take a long time to execute because it's extracting all data.
    The best solution is to explain to your user that it's working the way it's supposed to.. if a plant has no values then there were no transactions.

  • Assigning a Key Figure in a Multi provider

    In a multi provider if I have a key figure which is assigned from more than one part providers.  What does this exactly mean?  For example:
    Let's say I have a key figure Number of Sales which is present in two part providers and assigned from both the providers, if I build a query say Country | Number of Sales what happens with the assignment
    Thanks

    Good point.
    My scenario is as follows. 
    1. We are building a query which uses a base query as a template. 
    2. Our query is built off a seperate multiprovider which replaces one of the part cubes with a cube that has consolidated set of data from SAP and Non SAP systems
    3. In the original multi provider one of the key figures is assigned from two part providers, one of which is that which we are replacing - this key figure is used extensively in the definition of other query level key figures
    4. The key figure does not exist in the consolidated cube but we have a key figure that we will use instead of.
    5. The original query does not have info provider restrictions at the query or local key figure levels
    I believe I can sum the two figures when I define the Key figures in the new query but just needed clarity on if this is a solution hence wanted to confirm the values are being summed up assuming no restrictions etc
    Sorry guys,
    before I close this message I just wanted to confirm the following, do not want to save/activate the change on the system
    I have carried out a check after I removed the assignment from one of the part providers it seems that this is possible - this is correct.  If this is the case it seems that the business requirement is to sum the values from the two part providers
    I
    Edited by: Niten Shah on Jul 9, 2008 6:44 PM

  • How to create a document on a characteristic and key figure combination?

    Hello,
    I will need to create for my customer a document on a characteristic and key figure combination. I don't know yet which BW objects will be concerned, but I'm trying to understand how it works.
    1) I call the document screen in RSA1.
    2) I select InfoProvider data.
    3) I click on Create, enter a name and a description and go to the next register (Log.DOc.Properties).
    Question: What do I need to select here?
    According to SAP Help, the following has to be maintained:
    InfoProvider: How can I get my cube diplayed in the list?
    Query: Same question. But is it necessary to select a query?
    Key Figure: OK
    All characteristics for which the Characteristic is Document Property indicator is set: OK
    Hide Name: OK
    Thanks in advance for you help, Nathalie

    There's a link on the main support.mozilla.org page under "Customizing Firefox", to this article: [[How do I customize the toolbars?]] in case it helps you or anyone else finding this topic. It has a section on adding a new toolbar to Firefox.
    I can't help you on creating your own button, textfield and a combo box for the new toolbar but I see you (Dinesh) asked this question on Jan 5, here:
    http://groups.google.com/group/mozilla-labs-jetpack/browse_thread/thread/0d877e5afcbfe745# ''how to create a toolbar using add on sdk''

  • How achieve "cumulated" key figure in a webi report

    Hi all,
    In a bex query we can mark "cumulated" in properties of characteristic, then when we run this query  our key figures for this characteristic will be cumulated but for rest of characteristics will be non cumulated values. Please how can I get  this cumulated valued in a webi report ?? because in spite of mark this flag in our bex query  when I run  this characteristic in my webi report  it doesnt work.  Perphaps there is a function in webi or there is a proporty to modify in my universe??
    Thanks for your help in advance
    Santi

    Hi David,
    Try using RunningSum(), RunningAverage() etc.. function in Web-I.
    Regards,
    Rohit

  • Dynamic Description for Key figure values

    Hi Experts,
    I got a requirement for change the description in  query analyzer.
                  Month    200901                                         200902                            200903
                     qty        value   Past PRICE                qty    value    future price  qty    value    future price
    Material      10         50          5                              7       70           10          7       77           11        
    My requirement is price heading  we need to show current date to previous months header is Past price  and current date to future months we need to Future price.
    Already I tried with two restricted key figures with current montthless than one key figure and currentmonthgreater than one keyfigure. When I using in query both key figure displayed in both sides.
    I want to show past price heading for Less than current month  and future price heading for greater than current month.
    Please let me know any possibilities to show the description dynamically.
    Thanks,
    Chandra

    Hi,
    Here I'm giving sample code this will give the Date and Date-1 and Date-2 based on your Input date ZCDAY.Create 'ZT_DAY' 'ZT_DAY1'  and  'ZT_DAY2'  Text varaibles and use the code.
    In the same way change the code for your requirement.
    TO get the Date (TEXT VAR) based on ZCDAY Input variable***********
        WHEN 'ZT_DAY' .
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              l_s_range-low+0(2) = loc_var_range-low+6(2).
              l_s_range-low+2(1) = '.'.
              l_s_range-low+3(2) = loc_var_range-low+4(2).
              l_s_range-low+5(1) ='.'.
              l_s_range-low+6(4) = loc_var_range-low+0(4).
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
    TO get the Date-1(TEXT VAR) based on ZCDAY Input variable***********
        WHEN 'ZT_DAY1' .
        DATA: ZT_DT1 TYPE SY-DATUM,
              ZT_DT2 TYPE SY-DATUM,
              ZT_SDT TYPE SY-DATUM,
              ZT_YR(4) TYPE N,
              ZT_DY(2) TYPE N,
              ZT_MT(2) TYPE N,
              ZE_TT(2) TYPE N.
              ZT_SDT = SY-DATUM.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              ZT_DY = loc_var_range-low+6(2).
              ZT_MT = loc_var_range-low+4(2).
              ZT_YR = loc_var_range-low+0(4).
          CONCATENATE ZT_YR ZT_MT ZT_DY INTO ZT_DT1.  "YYYYMMDD
          CALL FUNCTION 'DATE_CREATE_2'
            EXPORTING
             i_datum_ein                   = ZT_DT1
             I_KZ_INCL_AUS                 = '1'
             I_KZ_INCL_EIN                 = '0'
             I_KZ_ULT_AUS                  = 'X'
             I_KZ_ULT_EIN                  = 'X'
             I_STGMETH                     = '0'
             I_SZBMETH                     = '0'
             I_TAGE                        =  0
           IMPORTING
             E_DATUM_AUS                   = ZT_DT2.
              l_s_range-low+0(2) = ZT_DT2+6(2).
              l_s_range-low+2(1) = '.'.
              l_s_range-low+3(2) = ZT_DT2+4(2).
              l_s_range-low+5(1) ='.'.
              l_s_range-low+6(4) = ZT_DT2+0(4).
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
    ***TO get the Date-2 based on ZCDAY Input variable***********
        WHEN 'ZT_DAY2' .
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              ZT_DY = loc_var_range-low+6(2).
              ZT_MT = loc_var_range-low+4(2).
              ZT_YR = loc_var_range-low+0(4).
          CONCATENATE ZT_YR ZT_MT ZT_DY INTO ZT_DT1.  "YYYYMMDD
          CALL FUNCTION 'DATE_CREATE_2'
            EXPORTING
             i_datum_ein                   = ZT_DT1
             I_KZ_INCL_AUS                 = '2'
             I_KZ_INCL_EIN                 = '0'
             I_KZ_ULT_AUS                  = 'X'
             I_KZ_ULT_EIN                  = 'X'
             I_STGMETH                     = '0'
             I_SZBMETH                     = '0'
             I_TAGE                        =  0
           IMPORTING
             E_DATUM_AUS                   = ZT_DT2.
              l_s_range-low+0(2) = ZT_DT2+6(2).
              l_s_range-low+2(1) = '.'.
              l_s_range-low+3(2) = ZT_DT2+4(2).
              l_s_range-low+5(1) ='.'.
              l_s_range-low+6(4) = ZT_DT2+0(4).
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
    Thanks
    Reddy

  • Query filter over key figure

    Hi,
    A report need to have a query level filter with key figure (to allow +ve values) but not possible for key figures.
    Scenario- every day deltau2019s get added in cube and final report publishes aggregated value. But requirement is to show historical value not the aggregated. This is how cube data looks like-
    Ex-
                                            Receipt Date    Profit Center  Amount(Key figure)  ZDAYS (Dimension)   ZDAYCOUNT(Key figure)
    First Day Posting            14/09/2009            K                     9800                             1                                          1
    2nd days -ve entry         14/09/2009           K                    -9800                             1                                         -1
    2nd days actual posting 14/09/2009           K                      6000                             2                                          2
    3rd days -ve entry          14/09/2009           K                    -6000                             2                                         -2
    3rd days actual posting   14/09/2009          K                     5000                              3                                          3
    Now report supposed to show posting values of every day like for Day 1 and Day 2...tried using conditins & other aggregation options but no luck. Does any one has a clue?

    Hello,
    The only thing i could think of is as below: Check if its plausible.
    1) Add a new infoobject ZFLAG (TYPE CHAR, LEN 1) in your cube.
    2) Now write a routine to populate values in this object while loading data. The routine is a simple one with below logic:
    if KF_value < 0.
    ZFLAG = 'N'.
    else.
    ZFLAG = 'P'.
    endif.
    3) Now for every -ve value record the ZFLAG will be tagged as N.
    4) Now in query filter out all the records with ZFLAG = N.
    When you need aggregated report, simply dont use the ZFLAG in the report and the report will show up aggregated values.
    Regards,
    Shashank

  • How to show filter values of restricted key figures in BEx Analyzer?

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

    Hi,
    I have following report.
                         Quantity USA        Quantity China
    Product           100                        150
    Quantity USA is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = USA
    Quantity China is a restricted key figure using key figure 'quantity' and a restriction on characteristic 'country' = China
    I notice that when I put only one of these resticted key figures into the query, there is a line in the filter area of the report in the BEx Analyzer that shows the characteristic 'country' and the value on which it's restricted in the restricted key figures.
    E.g.:
    Country          USA
                         Quantity USA
    Product           100 
    If I put both restricted key figures in the query, this line is not shown.
    Does anyone of you know how I can display this line again when using multiple restricted key figures like this in the query?
    Thanks!
    Regards,
    Pascal

Maybe you are looking for

  • Error in Loading a text file

    Hi Experts, I am having a little problem in uploading a file in a table File format is as follows weekly_eft_repo  1.0                                                                                                                           Page: 1 C

  • Can't run flash player in full screen on 2nd monitor

    Hi all! I have a laptop with dual video displays. The main display is the laptop's LCD and the 2nd display is a 19" LCD connected via VGA cable. I want to let a Flash movie loop endlessly on the second monitor while I continue to work on the laptop.

  • SAP BUSINESS WORKPLACE.

    Talking about SAP BUSINESS WORKPLACE , someone knows if exists there options to change about rules of the kind of messages that arrives in the inbox. One message to the corresponding folder x and other message to other folder.. Other problem that i'm

  • Oracle client 9.2.7 in 10g database

    Hi All, Our landscape is using oracle 10g (10.2.0.2) database with client version is 9.2.0.7 and currently we are using  sap 4.7. Is there any chance of causing any performance issue in our environment if we continue to follow the above scenario? I w

  • Increase internal table memory

    Dear Techis, How to increase size of internal table. while executing it gettin in DUMP. I checked wid basis consultanat the Heap memory is more than sufficient, but still my report is not gettin executed its showin dump . Will anybody pls tell me is