Dynamic choose which key figure to be showed on query

Hi, everybody.
I'm trying to build a query where, based on the user selection (maybe a variable input) the key figure A or B is showed. The key figure, due design requirements, is restricted in several lines inside a structure on query.
For example, the structure seems like this:
+Sold Quantity (restricted key figure: 0QUANTITY)
+Revenue (restricted key figure: 0AMOUNT + DOC_TYPE = 'XYZ')
+Returns (restricted key figure: 0AMOUNT + DOC_TYPE = 'ABC')
What I want is, depending on a user input, change the key figure restricted in 2nd and 3rd rows to oher, for example, ZAMOUNT.
Any tips or any idea if it is possible?
Thanks,
Henrique Teodoro

You can do it by using the basic formula <user input> * 0amount + <user input inverse> * zamount.
you can create that formula in calculated key figures.
here the user should be able to enter <user input> only 0 or 1...where 0 will give zamount values ....input value 1 will allow 0amount value to be shown..suppressing the other keyfigure.
Let me know if its clear ... else i can explain in further detail.
Award points if useful.
Thanks
Sharan

Similar Messages

  • How to identify which key figure will the numeric pointer for deltas?

    Hi All,
    I have created a numeric pointer for generic extraction ? but how to identify which key figure will the numeric pointer will use for deltas ?
    how to identify the key figures which is suitable for numeric pointer. And the generic extraction is based upon the copa table?
    Can anyone suggest me how the numeric pointer works and how to identify deltas are carried out at numeric pointer?
    Thanks
    Pooja

    Pooja,
    If you are using a generic extractor which is based on COPA table, then numeric pointer may not be the suggested delta extraction mechanism. 
    A time stamp would be the better one to use.  In a time stamp, you can give a lower limit value of 300 seconds.. so that it will try to fetch the missed records.
    Moreover, a delta would be based on a character, preferably a time char.
    In your requirement, try to figure out the character on whichdeltas will be based.
    Sasi

  • Key Figure in a Input Ready Query

    I have 9 key figures in my input ready query. 5 of them are not input ready and being loaded through a job and 4 are input ready. There is a problem with one key figure, I am able to see data for the key figure when i have START QUERY IN THE CHANGE MODE turned off. But once I turn it on it is not showing any data for the key figure. This is happening only wiht that key figure, all the other key figures are working fine. Could someone help fixing this
    Thanks
    Rashmi.

    Hi,
    I do face this type problem during my BI IP implemenation project. Pls chk thoroughly the following points.
    1.The planning mode of your real-time infocube should be on always on( you need change from load to planning mode, while inputting data).
    2.The START QUERY IN THE CHANGE MODE , should be on.
    3.In the planning tab of key figures, ensure you enable the button : Data can be changed using planning functions.
    4.In the advanced tab of key figures, pls make sure to enable the right button( Master data).
    5.Pls make sure  , the real time infocube, aggregation levels, filters etc, should be refreshed & active,if make any changes in planning model in between, in Aggregation levels,filters etc.
    6. Pls chk the locks( SM12) always, and delete all of them, if any.
    7. Log-off the  Server (BEX/DWWB) and restart the BEX ,then open your Input query, it should work .
    Regards
    CSM Reddy

  • Do i have to select all the key figures when i design a query off of a cube

    Do i have to select all the key figures when i design a query off of a cube? i have three keyfigures on the top of the three keyfigures it says calculated keyfigure. kind of lost dont know what to do. please let me know.
    Thanks!
    York

    No, you have to select at least one.
    Calculated keyfigure (CKF) means it's a formula of two or more other keyfigures. You can select, right-mouse click, display properties and you see how it is composed.
    Under calculated keyfigures you see all available keyfigures of the infoprovider you build the query on. Just move them by drag-and drop from the left to the right into the columns.
    You can have also restricted keyfigures (RKF). This means a keyfigure is restricted by one or more characterstics and their values.
    Hope you got an idea.
    Regards,
    Juergen

  • Dynamically Selecting a Key Figure at Runtime

    I need to develop a 12-month BEx workbook which shows for each record for each month (column): 
    1)     <i>Forecast Quantity</i> (key figure);
    2)     <i>Actual Quantity</i> (key figure); and
    3)     <i>Most Reliable Quantity</i> (somewhere, somehow calculated).
    For any given month of data, <i>Most Reliable Quantity</i> is to report either the <i>Forecast Quantity</i> or <i>Actual Quantity</i> based on the month/year of the data and the month/year in which the report is being executed.  More specifically, if the current month/year is greater than the month/year of the data, report the value of <i>Actual Quantity</i>.  Otherwise, report the value of <i>Forecast Quantity</i>.
    I would appreciate any suggestions as to how I should go about doing this in BW v.3.10?  (By the way, the report also requires that I present a 12-month total for each of these three quantity types.)

    I apologize for taking so long to evaluate and respond to the most recent suggestions.  My boss suddenly pulled me from this project and gave me several higher priority projects.
    I took this topic's most recent replies to someone in my company who has more years and depth of experience with BW than I do.  His conclusion (and I concur) is that while some of what is being suggested can be accomplished, it cannot all be pieced together into one complete solution.
    So, I have awarded some points to the most recent replies, and I am giving up on accomplishing this with BEx.  Instead, I am going to investigate if there is some way to periodically iterate through the cube updating a new key figure, <i>Most Reliable Quantity</i>.
    Thank you for all of the help that was offered.

  • 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

  • Dynamic Texts from Bex ( for Key Figures ) not coming to WEBI Query

    Hi Gurus,
    We have a Query in BEx : Each  Key figure column text changes dynamically - Like based on Present month
    it will Display Month +1 Month +2  up to Month +12.  Used  dynamic Text variables .
    But when i created the universe and Webi report , i am missing the text in the column for Key figures .
    How should i get the column text in Webi which is same as in Bex : Points will be awarded for helpful
    answers.
    Thanks
    Magge

    Hi,
    text variables with replacement path are supported in BO4.0, see following document: SAP BusinessObjects BI4 - Supported BEx Query Elements
    As an example after entering 2012 in the prompts window, the name of the corresponding key figure will dynamically change:
    After refreshing and selecting 2013, the column name will update:
    Im not sure though if this is the case with unv universe access to BEx queries.
    Best regards,
    Victor

  • How to dynamically choose which view to display in second step

    Hi Guys,
    I am just started to evaluate fpm to decide whether to use it in our project. So i have question that might be very simple to you all, that i hope you all can help me with.
    Say i want to use the fpm GAF with a single webdynpro component. I have 3 steps, first step display a dropdown list for user to choose, second step will be a view that will depend on user input on the first step and 3rd step just a confirmation screen.
    I plan to use UIBB for all the screen, not using the GUIBB. So i will need to dynamically decide which view to show on step 2, and since we don't call navigation plug when we use fpm, what is the best way to archive this? How do i design my webdynpro component and the fpm configuration etc...?
    I read from the programming guide about initial screen and variant. But what if my application doesn't need an initial screen and the user choosing step is not at the first step, I can't use variant in this case right?
    thanks.

    Hi
    You can give the dropdown on initial screen and than u can decide which screen  to show on the second (or infact that will we the first step you you have first step as a initial screen.
    How?? :
    1. Create different varients for the second step.
    2. Basis on the Value choosen in the dropdown list, select the appropriate varient using the following code.
      TRY.
            CALL METHOD io_gaf->set_variant
              EXPORTING
                iv_variant_id = 'VAR_CLIENT'.
          CATCH cx_fpm_floorplan .
        ENDTRY.     
    where  VAR_CLIENT  is your varient.
    Hope this will help you.
    Thanks & Regards,
    Arvind

  • Key figure description not show in BEx and WAD sometimes

    Hi experts!
    I have a big problem. Sometimes we have the effect that a report shows no key figures. I mean I see the numbers but no key figure description is shown.
    Example (correct)
    Country |    Hierarchy   |        Banking      |         ATM       |      ....    
    Germany |   Key figure 1 |           1.000     |         500       |      ....
            |   Key figure 2 |                27   |           9       |      ....
            |   Key figure 3 |                27   |           9       |      ....
            |   Key figure 4 |                27   |           9       |      ....
    Example (wrong)
    Country |    Hierarchy   |        Banking      |         ATM       |      ....    
    Germany |                |           1.000     |         500       |      ....
            |                |                27   |           9       |      ....
            |                |                27   |           9       |      ....
            |                |                27   |           9       |      ....
    We can solve the problem if so we deleted the query from the cache but that is not really a good solution.
    Any suggestions?
    Regards, Thomas

    Hi Thomas,
    I have a similar problem in WAD. After applying Patch 19, the Key Figures descriptions do not display in certain reports.
    From Query Designer, everything is OK.
    Could you fix the issue?
    Jean-Luc T.

  • Dynamically select Key Figures before executing web-based query

    Hi,
    I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. The query is web-based.
    Has anybody an idea how to achieve this?
    Kind regards,
    Ton van Velzen

    You will need 2 templates.
    First one use the Checkbox item to list all the keyfigure structure elements, read the user selections using JavaScript, form the URL with the Filters for the key Figures and call the second template which will display the data.
    See the attached for passing filter values to BW Web templates.
    http://help.sap.com/saphelp_nw04/helpdata/en/59/edfe395dd76846e10000000a114084/content.htm

  • Choosing specific key figure

    Hi all,
    There are 12 key figures (one for each month) and now I want select one of them in the query for output according to input value. For example, when user entry is 3, in the report will be visible column Z03, for 4 column Z04, etc.
    How can I achieve this behavior in BEX?
    Message was edited by: Jozko Pucik

    try out this:
    Drag and drop all 12 Keyfigures into columns panel of Query designer and hide them (right click>properties>Display:always hide).
    Create a new formula (formula variable )on '0CALMONTH2'(month) and hide it.Lets name it as 'Month'.
    Drag and drop 0calmonth2 into Free chars and restrict with a single value,ready for input,mandatory variable.
    now create a new Formula = (Month = 1)Kf1 +(Month = 2)Kf2 +(Month = 3)Kf3 +(Month = 4)Kf4 +(Month = 5)Kf5 +(Month = 6)Kf6 +(Month = 7)Kf7 +(Month = 8)Kf8 +(Month = 9)Kf9 +(Month = 10)Kf10 +(Month = 11)Kf11 +(Month = 12)Kf12 .
    So depending on the entered value in selection screen,respective Keyfigure will be displayed and remaining all will become zero in formaula.
    Message was edited by: Murali

  • Calculated Key Figures Corrupted in a BEX Query

    Hello SDN's,
    We are facing an weird issue in BEX Query. As part of Enhancing the query, We have created a new CKF and added in the Columns for the required CKF. It prompted for a Transport request and saved the Query elements for more than hour. Now the Query is throwing an Error messages where in more than some 30 CKF's got corrupted. When i check the CKF definition for all the corrupted key figures there is not Formula or Calculation.
    Below is the message which we can see in the BEX query for Corrupted Calculate Key Figure.
    Diagnosis
    Element ' XXX ' cannot be analyzed by the analytic engine without a definition.
    System Response
    Without a valid definition, the element will be ignored by the analytic engine.
    Procedure
    Provide a valid definition for element 'XXX'.
    Could anyone please help me to retrieve query back to normal ???. Your are inputs are appreciated
    Thanks,
    HA

    yo could try rsrt in bw and try to regenrate the query thats all i got. .otherwise always make a copy before you start working on a query. if it still is coruupted then you will have to recrate it. if the query is in your bwq maybe the basis can do a transport( not recomended)back. good luck..

  • Key Figure Attribute not displaying in Query Designer

    Hello Experts,
    I have an InfoObject which has Key Figures as attributes.  When creating a query I <b>once</b> was able to see these Key Figure attributes in the Query Designer.  Howerver, recently I am not able to see them anymore in our DEV environment. 
    In our QA and PROD environment I am to see these Key Figures attribues in Query Designer.  Is there a setting that I am overlooking?  We are currently on BW 3.5 with SP 19.
    Please help!
    Thanks in advance,
    BQ

    Hi Jaya,
    Thanks for the quick response.  But how to I check the authorization for 1KYFNM and what am I looking for?
    Thanks,
    BQ

  • Creating Formula Key Figure in BEx 3.5 Query

    Hello,
      I'm trying to create a formula key figures that gives me the Absolute Value of the Difference of two quantities.  The calculation needs to happen at each plant/material level.  It works great as long as you drill down by plant/material.  The users, however, would like to see the results only by plant.
    Is this possible in the query?
    Any Help Would Be Greatly Appreciated!
    Thanks!
    Tina

    Hello,
    Please try the following steps:
    In the query go to Hierarchieparameter and select expand till level and select secound level and check the results.
    Thanks.
    With regards,
    Anand Kumar

  • Sorting a Key Figure by default in a query

    Hi,
    I'm trying to set up a query with a key figure that is sorted in descending order by default everytime.  I tried creating the following condition:
    Key Figure - Sales Volume
    Operator - Top %
    Values - 100
    This sorts the key figure in descending order to a point.  When I add a characteristic to the report (for example, sold to), the sorting is no longer active.  I would like this key figure to remain sorted in descending order regardless of the any manipulation to the report.  But, I'd still like the user to have the ability to change the sorting if they want to sort by another key figure (ascending or descending)
    I'm using the BI 7.0 Query Designer.
    Thanks!!

    Check this:
    Sort Key Figures and Maximum query result
    Organising key figures in BEx Query Designer
    ordering display in a KF
    Hope it helps..

Maybe you are looking for