Forum Discussion

lisamb1's avatar
lisamb1
Regular Visitor
5 years ago
Solved

Calculate Percentage Difference Between Quarters

HI All, I am trying to calculate the percentage cost difference between 2 quarters. I am able to calculater a percentage costs difference between 2 months, but the quarters I cannot seem to find a so...
  • Anonymous's avatar
    Anonymous
    5 years ago

    A lot of text.... but where's the problem? 'Cause I can't see anything clearly pointing out the issue.

     

    This piece of code:

    VAR CurrentQTRCosts = SUM(EBSOptimization[CostAvoidance])

    will only sum up values that are visible in the current context. It will not auto-magically give you a quarter's value. So, if you select a period of time from your Calendar that happens to be a full quarter, the measures will work correctly. If you select something different, they won't.

     

    Is this the problem here?

     

    On top of that, time-intel functions work correctly when you use them on a proper Calendar, not when you want to use them with any column in any table.