0

Date Data Points

Hello,

I have a requirement to display various measures for 

Current Year 

Prior Year End

Prior Qtr End

Measures would be for e.g.

Balance

YTD Growth % (Current Month - Prior Year End Bal)/Prior Year End Bal

QTD Growth % 

MTD Growth %

Date     12/31/2025      1/31/2025    2/28/2025    3/31/2025        YTD Growth %      QTD Growth %     MTD Growth %

             100                  200               300               400                   300%                    300%                   33.33%

I am looking at time calculations to do this but wanted to check if there are other options as well

I can create flags for the various time points and I am trying that as well

Thanks

Mad

7 replies

null
    • VP Product Management
    • Ian_Macdonald
    • 4 days ago
    • Reported - view

    hi 

    Before we get onto the calculation side of things, you should set up your aggregate properties of your model correctly for this type of Measure.

    Metrics like Cash Balance, Inventory Level and others need a special aggregation rule. It makes no sense to sum Cash Balance by Time as you always want the latest value for a particular time period. You do however want to sum by say Store or Region or whatever. For this reason these types of Measures are known as semi-additive, i.e. they aggregate down some dimensions but not others, typically time.

    Pyramid supports semi-additive Measures and this can be set in your model definition. there are three types of semi-additive aggregations, Cumulative, First Child and Last Child.

    • Cumulative - adds each value to the previous one to create a running total down any time oriented hierarchy
    • First Child - returns the value of the Measure on the first instance of the lowest level if a regular hierarchy or the first date in the selected time period
    • Last Child - returns the value of the Measure on the last instance of the lowest level if a regular hierarchy or the last date in the selected time period

    Once set up, you don't need to worry about working out what is the last value for selected time period. If you select a year, it will give you the value on the 31st December, if you select June it will give you the value on June 30th etc.

    If you've already set up your model like this, then great, let me know.

    If not, I suggest you go read up a bit on semi-additive Measures, adjust your model, then come back here where we'll look at your calculations. See our Help for an example.

    Hope that helps.

    Ian

      • Mad_Amruthur
      • 4 days ago
      • Reported - view

       

      Thanks Ian, let me take a look and see if that helps

      Also on another note, the search on the help site is not working, I get 0 results for any search, not sure if others have reported it

      Thanks again

      Mad

      • VP Product Management
      • Ian_Macdonald
      • 4 days ago
      • Reported - view

       

      It works for me. Try clearing your browser cache and try again.

      Hope this helps,

      Ian

      • Mad_Amruthur
      • 4 days ago
      • Reported - view

       

      Will do, I tried multiple things, will also try another browser, thanks Ian

      • Mad_Amruthur
      • 4 days ago
      • Reported - view

       

      Hi Ian,

      I setup the semi additive measures but I am not still able to achieve displaying the growth outside of the hierarchy

      If you look at the sample output I have, we need to show a columnar date range (rows will be a drill down hierarchy) and the Growth Amt and Pct as singular columns outside of the date hierarchy

      When I create a measure for the YTD growth, it still appears with the date hierarchy with 0s for the ones where its not applicable

      Thanks

      Mad

    • Mad_Amruthur
    • 4 days ago
    • Reported - view

    One other caveat is all of our models are Direct Query models

    • Mad_Amruthur
    • 3 days ago
    • Reported - view

    One other need I have is to determine not just measures but dimensions as of a previous time period as well

    For e.g. I want to display what the rating is for a product this month vs last month in the same discover

Content aside

  • 3 days agoLast active
  • 7Replies
  • 28Views
  • 2 Following