Forum Discussion
MRN8840
6 years agoHelper I
Percent difference in visuals
Hi! I have a page looking like this: In the top and bottom section I can choose a week ('Uge i år') in a year ('År') and compare the consumption of electricity, water and heat. H...
- 6 years ago
hi MRN8840
For your case, you'd better use this logic to create a last year measure to get it:
Last year = CALCULATE(SUM('Table'[electricity]),FILTER(ALL('Date'[Year]),'Date'[Year]=MAX('Table'[Year])-1))Percent L/C = DIVIDE([Last year],CALCULATE(SUM('Table'[electricity])),0)Result:
here is sample pbix file, please try it.
By the way, for the next year measure, you could try this logic:
Next year = CALCULATE(SUM('Table'[electricity]),FILTER(ALL('Date'[Year]),'Date'[Year]=MAX('Table'[Year])+1))Regards,
Lin
Mariusz
6 years agoCommunity Champion
Hi MRN8840
Are the top and bottom slicers independent from each other or are these coming from the same table and you show different data by switching the interactions between visuals?
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
MRN8840
6 years agoHelper I
Hi Mariusz!
Thanks for your reply!
All the slicers come from the same date-table, but the two on the top only interact with the three top visuals and the two on the bottom only interact with the three bottom visuals.
So yes, I show different data by switching interactions on/off 🙂