The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all
I have a data table as such:
If I want a bar chart showing the difference between any two months (interactively chosen using slicers), sorted from largest to smallest, and being able to drill up/down for 'Type', 'Group', and 'Item', how should I go about it?
Is any data structure change required?
What I've tried:
1) Creating calculated measures for filtering month1 and month2
Value1 = SUMX('RawData','RawData'[Value])
Value2 = CALCULATE(SUMX('RawData','RawData'[Value]),ALL('RawData'[Month]),USERELATIONSHIP('RawData'[Month],'RawData'Dummy[Month]))
Value1 will change according to the selected month1 using Slicer1 (without affecting Value2 since ALL() is used), Value2 will change according to the selected month2 using Slicer2.
'RawData' and 'RawDataDummy' are linked with an inactive relationship.
Slicer1 will use 'RawData'[Month] and Slicer2 will use 'RawDataDummy'[Month]
2) Create a calculated measure for the difference between two values
Solved! Go to Solution.
hi @KWYew
hi @KWYew
Thanks @FreemanZ for the idea!
I had to modify the formula slightly for it to work, cause te FILTER() function somehow is not working as intended, probably due to the way my data is structured.
Below is what worked for me (I still had to create a dummy, unrelated table to store the [Month] for Slicer1):
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |