Forum Discussion
Anonymous
8 years agoNot applicable
Add % Diff from two years
Dear All, I need to add a DAX to show only the % change difference between 2 years where it always compares( Max Date / Min Date)-1 I've tried 2 things and it did return the change percent c...
- 8 years ago
You could solve that last issue through the use of ALL.
Sample data would help tremendously. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- 8 years ago
Hi Anonymous,
It could be like below.
Max 2way = CALCULATE ( SUM ( ATM[2way AC] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = MAX ( 'Calendar'[Year] ) ) )Min 2way = CALCULATE ( SUM ( ATM[2way AC] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = MIN ( 'Calendar'[Year] ) ) )Best Regards,
Dale
Greg_Deckler
8 years agoCommunity Champion
You could solve that last issue through the use of ALL.
Sample data would help tremendously. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- Anonymous8 years agoNot applicable
Thanks, Greg
Could you please explain where should I use "ALL"?
- v-jiascu-msft8 years agoMicrosoft Employee
Hi Anonymous,
It could be like below.
Max 2way = CALCULATE ( SUM ( ATM[2way AC] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = MAX ( 'Calendar'[Year] ) ) )Min 2way = CALCULATE ( SUM ( ATM[2way AC] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = MIN ( 'Calendar'[Year] ) ) )Best Regards,
Dale