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.

Similar Messages

  • Phone is using data when not in use. How do I make it stop?

    My iPhone 4S is using data when not in use. Any thoughts on how to make it stop?

    Hello Oakleymp
    You could always turn off cellular data in Settings to get it to stop using data while it is on standby. Another option to troubleshoot the issues is to reset all settings, go to Settings > General >Reset > Reset All Settings.
    iOS: About the Cellular Data setting
    http://support.apple.com/kb/HT4203
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • 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

  • 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 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

  • Formula variable for date calculations with date-characteristics (2004s)

    Hi SDN,
    I'd like to calculate the number of days between to date-characteristics. In 3.5, I was used to create 2 formula variables of the type 'replacement path', with 'date' as the dimension indicator. In my formula, I used the 'proces value as date' function for each variable, and I could perform calculations with them.
    I'm trying to do the same in 2004s. However, I can't create replacement path's with 'date' as a dimension indicator. So I use 'number' instead, but it doesn't work: my query shows 'x'.
    I can use the variables that I created using the 3.5 query designer as a workaround. But I hope there is a better solution.
    If other people experience the same problem, please respond. Then I know it's probably a bug.
    Kind regards,
    Daniel

    Daniel,
    Try to look at the formula variables defined before the upgrade and see what is different to the newly defined. I am guessing just the terminology used is different.
    If not the date value might be blank or something for one of the f-variables used. Try to display the formula variable values as KF in the query results and check what it is showing.
    I hope this helps.
    -Bala

  • Formula Variable: Current Date

    Can somebody let me know the SAP Delievered Current Date Formula Variable Name.
    Cheers!!
    Amit
    9990800302

    Hi.......
    As already said....you can use 0F_ADAY.....
    Usually global variables (as formula) are available for every query (and not specifically to a single provider)...in addition, you can find all the formulas when you build a new object (new formula) in your query (you can choose from formula hierarchy)...
    Check this..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/324de5a1-0201-0010-dc9a-a093cde87bb5
    Customer Exit.......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Oct 29, 2008 4:47 PM

  • What exactly is using data and how can i keep it from using data when im not using my phone?

    So i have an iphone 4 and i have used a lot of data this month(like almost 2GB) and i have barely touched my phone outside of wifi areas. I always shut down any apps that use data like youtube, funnypics, facebook, etc. but i do play some games during my breaks at work but they dont require data to play so to my knowledge those games arent using data(or are they?) i just need some help figuring out exactly what on my phone is using data all the time so i can turn it off. Is it icloud? Emails on auto update? Offline game apps(minecraft, sonic dash, the Mr. Series games?) Do all apps use data regardless? Somebody please answer me. And No im not buying a bigger data plan. 2GB is my limit but it seems as though i am hitting that easily with my iphone but the rest of my familyis usually miles away from 2GB and they all have Samsung Galaxy S4s.

    My first stop would be in Settings > Cellular if you are on iOS 7.  This has a lot of goodstuff. you can turn off cellular data as a who, see your current usage and even see which apps have used data and how much.  You can even turn off individual apps form using cellular data (restricting them to wifi only).
    I hope this helps!

  • 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

  • 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

  • Is it possible to use charecterestic used in formula variable

    Got a boolean logic in a formula of the  structure in BEx, i could create a formula variable for date , it works .However, i have to bring payment method into the logic ,( e.g.. if the payment method is 'C'-weekly then late payment logic is different then if it is not weekly) , Any idea how to achieve this in BEx.

    You could create a key figure that always displays a fixed value example 1.
    You then restrict this individual key figure to payment method C.
    The key figure is now only 1 for payment method C.
    In your calculation you now say: if key figure = 1 then ... else ...
    If statements are not directly possible, you can only do if statemements indirectly by a similar formula:
    (key figure = 1) * value
    if key figure is one -> result of (key figure = 1) is 1
    1 multiplied by value = value
    if key figure is not one -> result of (key figure = 1) is 0
    0 multiplied by value = 0
    You now have an indirect if clause.
    Please assign points if this solved your problem,
    Best Regards,
    Filip

  • Formula variable with replacement path

    HI ,
    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Thanks in Advance.
    Thanks
    Rajesh

    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    Yes. use I_step=1
    I_STEP = 1
    Call takes place directly before variable entry. Can be used to pre populate selection variables
    I_STEP = 2
    Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
    I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Yes you can use both the variable of time char to restrict a characteristic but that should not be used on single characteristic.
    You can use the sys defined  0date on one field and the customised one Zsydatum on other char.
    Regards
    KP

  • User input formula variable with greater than/less than operators for KFG

    Hello all,
    I have used a formula in my query that is a difference of two key figures .For e.g:
    Difference = tax from system A  -  tax from system B.
    Now when the users run the report they should be prompted for the 'Difference' threshold for seeing the report say where difference is greater 100 or equal to 10 and so on.Currrently I have created a formula variable with 'user input' and created a 'condition' to display 'Difference' greater than the user entered value.
    However,it is required to have various selection options for setting the threshold of difference.For e.g User should be able to set say 'equal to'/'greater than/less than/not equal to operator for 'difference' in the initial selection screen of the report.
    With the current user-input formula variable I am not getting these 'greater than' etc operators.Any ideas on how to achieve this?

    Ya know, that's all well and good ... BUT ... WHAT IF you do want to sort text type columns with Greater Than and Less Than operatiors??
    SQL does it just Fine ... so WHY does APEX have the limit??? This is an Oracle BUG ... it SHOULD NOT limit the operators ... I realize "they" may be trying to be helpful with proper constraints to field searches ... but ... if SQL can do it, then ... no need for a limit.
    EG ...
    Show the records where
    the "Begin_Year-Wk" data is less than or equal to "2009-09" AND
    the "End_Year-Wk" data is greater than or equal to "2009-04"
    ... to give everything that was running in that 5 week period whether or not it starts within that time frame
    I can run this query perfectly fine via SQL ... but not in APEX ... unless I reconvert a lot of strings back to numbers, and for sorting / formatting / explain-to-user purposes, I really don't want them to be numbers.
    So ... there's gotta be a hidden tweak for operators somewhere ...

  • Fox Formula Variable In Query Designer

    Hi Experts,
    I have created 1 variable in fox formula of type VARV and i want this Variable to show in query designer while creating new Variable so that i can replace the Query Variable With Fox Formula by Using Replacement Path.
    While Creating new variable in Query Designer it is not Showing that Fox Formula variable.
    Because i want to use this in WAD While Executing the Planning Sequence.
    Is there any way we could get That Fox Formula variable in Query Designer.
    Regards
    Girish

    Hi Marc,
    While Creating Variable from Query Using Query Properties it is still not Showing That Variable in Fox Formula.
    And My Requirement was to Replace that Fox Formula Variable With Query Designer Variable.
    Please Suggest any Solution.
    Thanks
    Girish

  • Formula Variable issue

    Hi,
    Can someone help me with the following issue as my client wants it quick.
    I have created a formula variable called "Enter number for formula" for number and used this formula variable  in a calculated key figure. When I run the query, it will ask me to enter a number in the formula variable and this number will be used in the calculated key figure to get the results for the calculated key figure in the report.
    Now the point here is that customer has to enter either 5 or 6 or 7 only in this formula variable and should not allow other numbers in the formula variable and more over we should have a selection option with only these 3 values and when customer pressses F4, he should get an option of selecting any one from these 3 values.
    Is this requirement feasible? If So can any one help me with an example.
    Advance Thanks for your help.
    Kishore

    Hi Aby,
    I have a quick question. My first priority is that, is selection option can be enabled for formula variable i,e when ever customer executes a query and presses F4 he should get 5 or 6 or 7 and has to select any one out of three.
    I can give the formula variable description "Enter either 5 or 6 or 7" but this can be worked out only if I have less values but if I have to select some numbers from 1 to 100 then definitely I need a selection option,
    and is the reason we are looking for selection option with the required values.
    Can you please help me with this.
    Thanks,
    Kishore

Maybe you are looking for