The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I have a report that shows sales totals for different categories, as well as the amount and percent change from the most recent date to the other dates. This is what my visual currently looks like:
The measures that make up the visual are the following:
Total = SUM('Table'[Amount])
Change from = CALCULATE([Total],'Table'[Date]=MAXX(ALL('Table'[Date]),[Date]))-[Total]
% Change from = DIVIDE([Change from],CALCULATE([Total],'Table'[Date]=MAXX(ALL('Table'[Date]),[Date])))
The issue with my visual in it's current position is that I need the most recent date to be on the left, with the date sorting descending from left to right instead of ascending from left to right. I created an Index that will sort the dates in descending order, but when I sort the dates, my visual turns into this:
I have tried to follow the instructions explained in this post: https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-us... , but it doesn't end up changing anything. After changing the measures to follow the post's instructions, they look like this:
Total = SUM('Table'[Amount])
Change from = CALCULATE([Total],'Table'[Date]=MAXX(ALL('Table'[Date], 'Table'[Index]),[Date]))-[Total]
% Change from = DIVIDE([Change from],CALCULATE([Total],'Table'[Date]=MAXX(ALL('Table'[Date], 'Table'[Index]),[Date])))
Any help would be greatly appreciated! Thank you in advance!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
17 | |
12 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
14 |