Calculate the variance between quarters and store it in a scenario

Hi,
Can anyone suggets how I can write a rule to calculate the variances between quarters, Qtr1 vs Qtr2, Qtr2 vs Qtr3 etc, and store them in a scenario so that I dont calculatethem on a report ?
Thanks,
IK

Hi. Why don't you want to do this on the report - it's much easier and you can get favorable/unfavorable comparisons? But, if you want to do the rule, here's the approach.
Create the scenario with QTD as the frequency so you don't have monthly periods
Limit the rule to run just for the scenario and don't run any other rules for the scenario
Use a select case to determine which period (Q1, etc.) is being calc'd to populate variables that contain the source period and year (for going back a year to Q4).
Write the rule to compare data from current quarter in the real scenario to the prior quarter in the real scenario. Something like HS.Exp "A#ALL = A#ALL.S#Actual.P#Jun.W#QTD - A#ALL.S#Actual.P#Mar.W#QTD. But, you may want to adjust this to calculate a favorable/unfavorable variance on the revenue/expense accounts, so you'd need to loop through the accounts and look at the account type.
You'd want to rerun the rule at all value members for both base entities and parent entities. May need to clear all existing data (HS.Clear "A#ALL") in the scenario/year/period/entity/value first.
Do a consolidate all on the scenario to pull the data across and do the math
Have fun, but you really should still with doing the comparison in the reports.
Eric

Similar Messages

  • Calculate the variance between two row

    Post Author: jane
    CA Forum: WebIntelligence Reporting
    Hi,
    I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
    Date
    Sales Amount
    3/12/2008
    2300.00
    2/12/2008
    1280.00
    Changed
    1020.00
    I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
    Thanks!

    Post Author: Vinl
    CA Forum: WebIntelligence Reporting
    I am having the same problem and am steping outside of the box and cannot progress.
    Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
    I am trying to do it at column level mind you, which should not make that much difference....
    Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
    Used to work ok...?

  • How to calculate the difference between intdate and getdate

    Hi,
    My requirement is to get the data for all the claims where the difference between transactiondate and getdate() should be less than or equal to 7 which means any claims that happened in the past week.
    So, my query would be something like this
    select * from claims
    where transactiondate-getdate < 8
    But my transactiondate is in int format such as 20150331 and getdate would be in the format of 2015-03-31. Can someone please help me on how can i achieve the difference between these 2 date formats in the where clause.
    Please let me know if you have any questions or if i am unclear.
    Thanks

    Hi SqlDev12,
    Please find the below condition in your query,hope it would help you
    DATEDIFF(DD,CAST(CAST(TransactionDate
    AS
    VARCHAR)
    AS
    DATETIME),GETDATE())
    < 8
    Thanks & Regards,
    Praveena.

  • Calculate the days between today and specific day.

    I'm trying to calculate the number days between Today and some specific date in the future using SharPoint Designer (XSL). This is what I'm using:
    <xsl:value-of select="number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Due_Date))))- number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today))))" />
    e.g. 23 days >>>> 634948416000000000 ticks
    This works perfectly while I'm in SPDesigner itself, but once I try to see it in the browser it shows the number of days in "Tick Numbers". Is there a way I can fix this? I've been looking all over the internet and I haven't found any really good answer.
    thanks!

    Thanks for the quick response Marc.
    I've no experience of using momentsJs with SharePoint lists and I need to be able to get this up and running pretty quickly. I guess you need some coding experience to use it?
    I'm thinking that there should be a way to do this in SPD with something similar to this from another site, but with the conditions placed on the source field (Planned end Date)  instead of the current date. 
    not((ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Plan_x0020_Ende)))
    >=
    (ddwrt:DateTimeTick(ddwrt:Today())-(7*24*60*60*1000*10000)))
        and
    (ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Plan_x0020_Ende)))
    <=
    (ddwrt:DateTimeTick(ddwrt:Today())+(7*24*60*60*1000*10000))))
    and
    not((ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Ist_x0020_Ende)))
    >=
    (ddwrt:DateTimeTick(ddwrt:Today())-(7*24*60*60*1000*10000)))
        and
    (ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Ist_x0020_Ende)))
    <=
    (ddwrt:DateTimeTick(ddwrt:Today())+(7*24*60*60*1000*10000))))

  • To calculate the variance percentage

    In below given query , i want to calculate the variance between Forecast and sale.
    Here
    FRCST - Forecast
    SALE - Sale
    FRCST-sale - Difference between forecast and sale
    Now i want to display one more column i.e Variance
    I need a statement to caluclate the DIFF / FRCST. The result should be displayed according the conditions :
    1) If Forecast is Zero, and Sale is Zero - then result should be No Forecast and Sale for the item
    2) If Forecast is Zero, and sale is not Zero, then Sale against Nil Forecast
    3) If Sale is Zero and Forecast is not Zero then No sale against Forecast
    4) If difference between Forecast and Sale is zero (Both are non zero numbers) then No Variance
    5) If Forecat and Sale difference is not Zero then DIFF / FRCST
    The problem arise when the FRCST is Zero and Sale is non zero then divide by zero occurs
    Kindly guide me on this..
    SELECT ITEM_NAME, NVL(FRCST,0) FRCST, NVL(SALE,0) SALE, NVL((FRCST-SALE),0) DIFF
    FROM
    SELECT DISTINCT ITEM_NAME
    FROM OM_ITEM
    WHERE ITEM_CODE LIKE 'F%'
    AND ITEM_FRZ_FLAG_NUM<>1
    SELECT FYEAR, FMNTH, FITEM_NAME,FRCST
    FROM FORECAST
    WHERE FYEAR||'-'||FMNTH = :YM
    SELECT SYEAR, SMNTH, SITEM_NAME, SALE
    FROM SALE
    WHERE SYEAR||'-'||SMNTH = :YM
    WHERE ITEM_NAME = FITEM_NAME(+)
    AND ITEM_NAME = SITEM_NAME(+)
    ORDER BY 1

    I had changed the query as given below . Its giving me result, but how could i convert the case statement into decode. Is there any simple way for this:
    SELECT
    ITEM_NAME, FRCST, SALE, DIFF,
    (CASE
    WHEN FRCST = 0 AND SALE = 0 THEN 'No transaction '
    WHEN FRCST = 0 AND SALE <>0 THEN 'Sale against Nil Forecast'
    WHEN FRCST<> 0 AND SALE = 0 THEN 'No Sale against Forecast'
    WHEN FRCST<>0 AND SALE<>0 AND DIFF=0 THEN 'No Variance'
    ELSE TO_CHAR(ROUND((DIFF/FRCST),2))||'%'
    END)VARIANCE
    FROM
    SELECT ITEM_NAME, NVL(FRCST,0) FRCST, NVL(SALE,0) SALE, NVL((FRCST-SALE),0) DIFF
    FROM
    ( SELECT DISTINCT ITEM_NAME FROM OM_ITEM
    WHERE ITEM_CODE LIKE 'F%'
    AND ITEM_FRZ_FLAG_NUM<>1
    ( SELECT FYEAR, FMNTH, FITEM_NAME, FRCST
    FROM FORECAST
    WHERE FYEAR||'-'||FMNTH = :YM
    ( SELECT SYEAR, SMNTH, SITEM_NAME, SALE FROM SALE
    WHERE SYEAR||'-'||SMNTH = :YM
    WHERE ITEM_NAME = FITEM_NAME(+) AND ITEM_NAME = SITEM_NAME(+)
    ORDER BY 1
    )

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all,
    1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX?
    MEMBER [Measures].[Q1 act.period to date sales] AS
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,[Measures].[Sales amount]
    This is the measure I have, I need to add the max date is W20. 
    2)Also, when I calculate the sales between [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[40] and the currentmember, for example being [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[20],
    he calculated the sales between this period. However, in theory this is not possible because W20 < 40. Is there any way I can put a constraint on this that he only calculates the sales if the currentmember is > the start period?
    Thanks in advance!

    Y, you can put a check on to determine if currentmember > start period.
    Firstly, your period keys are composite of year and period (indicated by the two ampersands in the fully qualified date above). If your period keys were non-composite (eg 201501) it would be a simple matter of 
    IIF([Date invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null)
    There are advantages of having two period attributes on the dimension, one with a fully unique
    key and the other with just the period of fy, but that's digressing.
    With your composite keys, you could use a calc like the following for the SUM()
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,IIF([Date
    invoice].[Bonus calendar - Week].Currentmember.parent.properties("key") +[Date
    invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].parent.properties("key")+[Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null))
    Richard

  • How to read time stamps from a spreadshee​t and calculate the difference between consecutiv​e time stamps?

    Hi,
    I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
    Time Stamp                    Power Output
    11:00:00 AM                       3kW
    11:00:02 AM                       2.9kW
    11:00:04 AM                       3.2kW
    11:00:06 AM                       3.1kW
    The above data doesn't make any sense, but it is just for the purpose of this question.
    So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that

    Hello
    you can simple subtract one time from the other one and so you get the difference. -> Example
    Mike
    Attachments:
    Unbenannt 2.vi ‏8 KB

  • How to read time stamps from a spreadsheet and calculate the difference between consecutive time stamps?

    Hi,
    I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
    Time Stamp                    Power Output
    11:00:00 AM                       3kW
    11:00:02 AM                       2.9kW
    11:00:04 AM                       3.2kW
    11:00:06 AM                       3.1kW
    The above data doesn't make any sense, but it is just for the purpose of this question.
    So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that is sent. Then I have to

    Repeated forum post
    Please view http://forums.ni.com/ni/board/message?board.id=170&message.id=294435
    Regards,
    Juan Galindo
    Applications Engineer
    National Instruments

  • Calculate the Difference Between two dates excluding weekends and Holidays

    Hi,
    We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
    We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
    Ex:
    Col1 col2 Total
    11/9/2010 2:46:38 PM Null 13
    11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
    (In the Total we shouldn't include the weekends,holidays)
    Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
    Thanks
    Edited by: user10441472 on Nov 22, 2010 3:14 PM

    You already asked this question and I answered it...
    Re: calculation of Business day in OBIEE

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • What is the difference between quarterly patches and patch sets

    Hello,
    What is the difference between quarterly patches and patch sets?
    Should we always apply the latest quarterly pathches?
    Is it better to apply to the latest patch set if one can afford?

    The quarterly patch sets are generally security fixes, or Critical Patch Updates (CPU). Oracle strongly recommends that the CPU patches are applied. CPU and quarterly patches do not change the release/version of the database.
    The patch sets contain bug fixes and do change the release/version of the database.
    As with all patches you should test them on a test database before deploying in production. If you have vendor supported applications you should contact your vendor before applying any patchsets.

  • Calculate the difference between Creation date and key date

    Hello
    I want to calculate the difference between creation date of the document with key date(todays date). How can i do that in the query designer. Also then I want to restrict my key figure on this difference if it is =10..please can someone suggest what can be done
    thanks

    Hi Grame...
    For the days calculation ..
    I suggest you to use replacement path ..
    I have the reference that you can see the sample. The case of samples is also about day calculation.
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Hopefully it can help you a lot.
    Regards,
    Niel.

  • %variance between parent and child hierarchy

    Experts,
          How to calculate a percentage variance between parent and child hierarchy.
    Ex: parent is 80 and child is 20 so I need a %variance between 80 and 20.
    Thanks in advance.

    Hi Nikki
    Create structure and restrict parent hierarchy with one node and child hierarchy with another node and create formula node to calculate the percentage variance between two nodes.assign points if helpfful.
    Regards
    Murali.

  • What is the Difference between Consolidation and Aggregation

    Hi Masters
    What is the difference between Consolidation and Aggregation? i think both are same, what is the exact difference in-terms of HFM and Essbase?
    regards
    Taruni

    The differences lies in the mechanism used to calculate and store the value. Dynamic members such as parent accounts or customs, derived views, parent periods, or <Total> members in the value dimension are performed on the fly in the HFM app server's memory without any discrete action on the user or adminisrator's part. These are aggregations in this context, and are distinct from amounts that are calculated and then stored in the HFM database which are either the result of direct data entry (from data loads or journals) or calculated amounts resulting from HFM's rules. "Consolidation" in your question would be one of the stored, calculated amounts in HFM.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for