Forum Discussion
Calculate Percentage Difference Between Quarters
- Anonymous5 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.
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.
daxer thank you for your assistance I am still learning Power BI and this did resolve the issue. I thought the CurrentQTRCosts and PreviousQTRCosts would identify the quarters, but after your explanation I did go pick a full quarter and that did resolve the issue of the percentage not displaying correctly.
Per your suggestion I will change the code to look at my Calendar table instead of the date in my data table. I was not aware of time-intel functions not working correctly if I did not use the Calendar table.
Thank you again!