Condition formula variable on date key figure

Hello, I would be grateful for any help on this
I want to have a condition that has a user input formula variable
But the Key Figure on which I want to base the condition is a Date
And when you create the formula variable it allows only the following Dimensions :
Amount
Number
Price
Quantity
ie Date is not one of the allowable Dimensions - is there any way round this apart from an Exit variable ?
thanks
Jon

Hi,
You have to create a formula variable with replacement path based on the date you want.
so that you can get the date for calculation.so you can apply condition.
check the following link
http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm
Regards,
Ranganath

Similar Messages

  • Conditions: Variables on date key figures

    Dear Sirs,
    I am trying to create a condition on a key figure of type date (subtype: dats). I want the user to select a date interval for this condition, using variables.
    The problems seems to be that the variable input screen thinks the user should enter an amount and not a date. If I enter a date in the variable then no data is beeing displayed.
    So how can I get the variable to understand that the input is a date ?
    Has anyone done what I try to do sucessfully.

    Hello Rakesh,
    thanks for your input. However, I am not able to get it to work.
    I create a condition on the key figure "date". I use e.g greater than. Then create a variable with replacement path to 0CALDAY, and transfer the condition.
    When I run the report I get the following error.
    Termination message sent
    ABEND BRAIN (418): Variable VAR_20080128112329 (D2LEOFV2P3JFW0YWPGXBKJ53A) does not exist or is incorrectly used 4 D2LENS95OIB2G5DTW28S323D2
      MSGV1: VAR_20080128112329
      MSGV2: D2LEOFV2P3JFW0YWPGXBKJ53A
      MSGV3: 4
      MSGV4: D2LENS95OIB2G5DTW28S323D2
    Have you managed to solve the excact same requirement?
    regards,
    Jørgen

  • Using Formula variable in a key figure formula

    Hi Expert,
    Can anyone tell me how to use a formula variable to pass the fiscal year variable value (with offset values define in different columns) to the be used in the formula (if statements)?
    Currently, I create a formula variable using replacement path from the fiscal year reference object and key but it's not pull the correct value. I'm not sure what's the difference between the different objects i.e. key, external char key value, attribute value etc.
    Please give me some lights.
    Thanks!

    Hi Janice,
    From Standard SAP Help
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/565cd22fc95f6ce10000000a1553f6/content.htm
    Don't want to sound rude, but please search the Forum and SAP Hel before posting a thread, it helps everyone.
    Thanks
    CK

  • How to create Variables for the Key Figures

    Hi All,
    How to create Variables for the Key Figures
    Thanks
    Bhaskar

    Hi,
    It is not possible to create the variables on Key figures directly. But we can create a formula variable with processing type 'User Entry' ,SO that the user entered value can be used in the calculations of the query.
    With rgds,
    Anil Kumar Sharma .P

  • How to fill date key figure with system date?

    Dear All,
    We would like to set on specific action (button press) to assign current system date top a date key figure within our infocube.
    Any idea how to achieve this?many thanks in advance for any idea!
    Kind Regards
    Olivier DESFOUR

    Dear Khaja,
    I'm not exactly using an update rule, i'm using Integrated Planning component.
    Customer would like to set this key figure on user action; ie for example
    user validate a step within planning process by pressing a button on workbook.
    then system is stamping system date within cube.
    Hope it helps
    Kind regards
    Olivier

  • Formula variable using date char - unable to use conditions

    Hello Experts,
    I am sure I am making a silly mistake here - but after spending lot of time I am unable to rectify this - please help if you can:
    I basically want the report to show only latest employee actions for a selected period (usually month).
    1. I am using formula variable that is based on 0CALDAY and defined as number.
    2. A calculated keyfigure uses this formula variable. Both calculated keyfigure and CALDAY char are included in the report / navigation.
    3. There is a condition defined using calculated keyfigure. No matter what logic I use, I just cannot use calculated keyfigure to filter records on the report. My original idea was to use Top N - 1 with char combination as 'Employee' to get me the latest employee records for each employee.
    Can anyone help spot where I am going wrong?
    Thanks.

    I haven't looked at that, but as a first guess idea- why not use the picker to get a date, then save it as a number of seconds from a given date?
    See:
    dateWithTimeIntervalSince1970:
    Creates and returns an NSDate object set to the given number of seconds from the first instant of 1 January 1970, GMT.
    + (id)dateWithTimeIntervalSince1970:(NSTimeInterval)seconds
    Or you could store it as a string, but I think the number would be easier.

  • How to use exception for a Date Key Figure

    Hello All,
                    I have the following requirement.
    1. I have a Key Figure which is Date Type.
    2. I need to color the cell to green if the it is filled with date otherwise leave it as it is.
    Please suggest how to overcome it.
    Thanks & Regards,
    Rajib

    hi,
    Your requirement is not clear, you have the below setup
    I have the following requirement.
    1. I have a Key Figure which is Date Type.
    How can a KF be of date type, or is it the value of a date characteristic that you have extracted in KF using formula variable. If yes you just need to define exception for the value greater than 0.
    regards,
    Arvind.

  • Formula variable for date in report

    Hi All,
    I have to display the last date value of a particular date in the report.
    For a better understanding,
    I have Customer, Equipment, Service date, Amount
    In the report, I have to display
    Customer, Equipment, Last Service date, Last Service Amount.
    I have created a formula variable (Formula variable for Service date) for Service date with Replacement path.
    Replace Variable with Infoobject, Replace with Key, Dimension dates.
    And in Key figures, I have created a formula (Last Service date) with Last value in the Aggregation using the "Formula variable for Service date".
    The Last Service date is displayed as 'X' in the report since the Service date is not in the row. I cannot have the service date in the row either (not even by hiding the display).
    Kindly tell me how to rectify this problem.
    Thanks and Regards
    Adhira Anand.

    The X is appearing because, with the drill downs you have added, you have more than 1 date value to choose from when you attempt to aggregate.
    Have you tried using APD instead of exception aggregation?
    Have you built the exception aggregation calculated key figure globally or just locally (i.e. as a structure element)? It must be built globally to work properly.

  • Formula variable for dates

    Hi gurus,
    I am trying to fill a formula variable of type date via manual entry, but I cannot find which is the correct way to do it. I can introduce any other type of data (amount, prices...) via manual entry but I can´t do the same with dates. Any help about this??
    Thanx.

    Hi Ortiz,
    You can do it like this:
    1. Create one variable based on any date field.
    2. In you query In column create 1 selection, restrict any key figure with this variable (created above). In display property set Hide.
    3. Create 1 formula variable with processing type customer exit and choose dimension as date.
    4. Now in CMOD, write the below code for your formula variable:
    Suppose the source variable name is ZDATE1,
    Forumla var name is ZFinal_date
    Code it like this:
    when 'ZFinal_date'.
    READ TABLE i_t_var_range INTO wa_value WITH KEY vnam = 'ZDATE1'.
            wa_range-low    = wa_value-low.
            wa_range-opt    = 'EQ'.
            wa_range-sign   = 'I'.
            APPEND wa_range TO e_t_range.
    Now u will get the date inputed value in your formula cariable.
    5. Create 1 CKF and do the subtraction in there:
    if ur key figure name is KF1 then type forumal as:
    KF1 - ZFinal_date.
    Hopefully u wil get the desired output.
    Thanks
    Dipika

  • One Variable 2 Restricted key figures on 2 different Dimensions

    Hi all,
    Here is my problem:
    I have a cube based on SD sales items. I want to calculate 2 retricted key figures on the 0net_value retricted by a date.
    The first key would be restricted by the installation date, and the second one by the cancellation date.
    Those two dates are set using a user input.
    When I try to do this here the error message I get:
    "Variable ZD_CSDATE is used in both (structure) element EL099Z0TL38F14TMC6AL7XKQD, and element EN4ZFAZEYGZ36B06JU04297W5 for various characteristics (0CANC_DATE, 0UCINSTDATE). This is not permitted as the characteristic is required for the F4 value help structure."
    I created 2 variables set by customer exit, this solve the problem but is not convenient at all. So who could use one and only one variable or how can create a variable by copy of another one?
    Thanks
    Matthieu

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi
    <Br>
    I am sure you can make more than one Restricted Key Figures which are restricted to same variable value for some Characteristic.  And secondly there is no easy copy and paste option to create 2 Customer Exit Variables. You need to find out the ABAP Code written using T-Code: CMODE for the Variable Exit and there you can copy and paste a part of this code to populate new variable. If you check the ABAP Code, you would understand what I am saying.<Br>
    I am more surprised at that F4 Help in the error message. Please investigate more in that direction.
    <Br><Br>Hope it helps.
    <Br>
    Cheers
    Abhijit
    <Br>* It's a good habit to reward someone with points in SDN if you think his/her
    response was helpful to you
    </FONT>

  • Formula variable - Maximum Date in result output

    Hello Guys,
    Scenario -
    Data in Cube
    *Reseller      Sales Date*
    RS1          01.01.2010
    RS1          01.01.2011
    RS1          01.01.2012
    RS2          01.01.2008
    RS2          01.01.2009
    RS2          01.01.2010
    Required Output - Display one record for each Reseller with recent Date.
    *Reseller      Sales Date*
    RS1          01.01.2012
    RS2          01.01.2010
    What I did till now --->
    Created a Formula and included a Formula Variable (replacement Path ref char - Sales Date) hence I got the date as keyfigure.
    Reseller      Sales Date     Sales Date Formula
    *RS1          01.01.2010     201,00,101*
    *RS1          01.01.2011     201,10,101*
    *RS1          01.01.2012     201,20,101*
    *RS2          01.01.2008     200,80,101*
    *RS2          01.01.2009     200,90,101*
    *RS2          01.01.2010     201,00,101*
    For the Sales Date Formula (Calculation tab - Calculate result as Maximum) to display the result as maximum.
    The issue is that when I remove the Sales Date from Drilldown the Sales Date Formula display X. I was expecting the result row to be displayed i.e  the maximum value for RS1 and RS2.
    Can you guide where I am going wrong... or any other method to achieve the above output is appreciated.
    -Amit

    Hi,
    Through replacement path you can achieve this.
    On row side put *Reseller.
    on Column side create a formula(and  on Aggregation Tab: Exception Aggregation: Last Value, Reference Characteristics: Sales Date)
    and there create formula variable and use replacement path.
    Details
    Type of variable: Formula
    Processing By: Replacement Path
    Reference Characteristics: Sales Date
    Replace variable with: InfoObject
    Replace With: Key
    Dimension: Date

  • How to create selection variable on a Key Figure

    Dear Experts,
    I have a key figure 'No of Days' in the BEx Query. I need a selection variable which when the users provide the input, should give me the report output where the rows shows only those whose No of days are less or equal to the input value.
    I am able to create such a selection out of a Characteristics field but I am unable to create one from a key figure.
    Kindly note that we are not using the BW Portal. We are running this report in the webi from a Universe created from the BE Query.I know that it is possible to ceate such a scenario in Webi, but we want the selection coming from the BEx Query for better report performance.
    Thanks,
    Sai

    Hi Experts,
    Thanks for the suggestions. I cannot use the 'Condition' since this BEx query is being called from a Webi report. MDX will not recogonize the condition.
    I was able to create a Variable and use it in the calculated key figurare. The problem is , I am getting 1 where the condition is met and 0 when the condition is not met. But I want to see only the results where the condition is met. How to to avoid the rows where the result is not met.
    Am I getting this because there are actually 3 other key figures along in the query in addition to  the key figuare ' No of days'.
    Should I add some condition to the other key figuares also.
    Kindly confirm and help.
    Thanks,
    Sai

  • Can we create variables(prompts) on Key figures in Bex(SAP-BW/BI).

    Hi,
    Can we create variables on key figures, If yes,Please let me know the process step by step.
    My requirement is we have key figures Supply Elements(SE) like purchase order,production order,planned order etc and Demand Elements(DE) like Deliveries,Sales order etc. All these Key figures are dragged and available in Rows.
    Now my clients wants variables on SE and DE.
    For SE  & DE = Variable type is OPTIONAL and Variable input value =LIST VALUES.
    Can any one help me on this.
    Your Effort will be Valued.
    Regards,
    Krishna.

    Hi Kamal,
    These are the Keyfigures with Data type QUAN with unit:0BASE_UOM.
    Under :
    SE - Purchase Req (ZSEOOPR),Purchase Order(ZSEOOPO),Production Order(ZSEOOPRQ) Etc..
    DE-Safety Stock(ZDESS),Sales Order(ZDESRSO),Deliveries(ZDESRD) Etc..
    In column it has structure which displays the month of Jan-Dec.
    The output of the report  snapshot attached
    Now my client requirement is
    S8e
    Demand Elements
    No
    Text
    N/A
    N/A
    N/A
    N/A
    Yes
    Optional
    List Values
    Default to All
    S8e
    Supply Elements
    No
    Text
    N/A
    N/A
    N/A
    N/A
    Yes
    Optional
    List Values
    Default to All
    Regards,
    Krishna.

  • Calculation based on date key figures in BEx

    Hi Friends,
    Hi Friends,
    I need to creat report for sales order data, which involved the calculation based on dates.
    In my cune iam having the data at the granual level with the dates as key figures. the calculation that i need to do is VTW = Actual PGI date - Customer want date.
    1) whn i run the report at the granual level my VTW is working correctly. No issues.
    2) when i run the report at higher levels the date fields are updated with X, as the system is unable to aggrigate the dates. The dates are at the material level in  a sales order. I need to show the VTW at the sales order level (each one of the two dates are same for all the materials). So, when i run the report with out mataril at the sales order level...i wanto sea the bothe date fields in a single line and also the VTW calculated as the different between throse two dates.
    3) Once we get the VTW correctly at the sales orde level. if i drill down the report for material, i want to sea both the dates in every record againest the matarial, but the VTW only aginest the first record...that is againest the sales order. I dont waht the VTW value repeated/duplicated for all the records againest the sales order,as VTW makes sence only at the Sales Order level.
    Please suggest me hwo i can achive the resulsts by meeting both Point 2 and 3.
    Thanks for ur help...in advance.
    Thanks,
    Renu

    Hi..
    I have the data from the extractore and in the cube as below.
    SALES ORDER    ITEM                MATERIAL            DATE1                         DATE2
    101                        Item1               Mat1              01/01/2010                15/01/2010
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                       Item3                Mat3             01/01/2010                15/01/2010
    I need the reports as below...
    Report1:
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                        01/01/2010                15/01/2010                14
    currently iam getting this Report1 output as below...
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                             X                                   X                           42
    Report2: Out put required as below
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                   I     tem3                Mat3             01/01/2010                15/01/2010
    currently iam getting this Report2 output as below...
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010               14
    101                   I     tem3                Mat3             01/01/2010                15/01/2010               14
    As VTW is need to be measued at the sales order level and we always have the DATE1 & DATE2 as same for all the itesm, it should be shon as only 14 in the first record. It mean once iget the required output from Report one in a single line with VTW as 14, it should not repeat with every line , when i dril down the report for Items or materials.
    Even if i can generate oly report2 as required in a single sheet ...that will be enough.
    Plas kindly provide some solution as how we can achieve this,
    Thanks,
    Renu

  • Formula Variable for Date/year not possible

    Hi, I have a query where I want to create a formula variable for a year that I can use in a user exit to populate other variables.  When I go to create a formula variable there is not option for a date or year variable.  I only see Amount; Quantity; Price; Number.  Is it possible just to create a formula variable for a year input without having a year time characteristic in the query?
    Thanks!

    I just ended up creating a Formual Variable as a number.  Thank You

Maybe you are looking for