Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hey Everyone,
I need your help.
I have a table with Recording details by month and I would like to see the difference based on slicer selection.
User has to select two Months in a slicer to compare the numbers.
Difference = Recordings (Later Month) - Recordings (Earlier month)
Table data looks like this:
Is there a way to make the measure dynamic so it follows the slicer selection?
Solved! Go to Solution.
@Anonymous There is if you unpivot those month columns so that you have:
Month, Value
March, 1200
April, 1500
...
You could then do this:
Difference Measure =
VAR __Min = MIN('Table'[Month])
VAR __Max = MAX('Table'[Month])
VAR __Month1 = MAXX(FILTER('Table',[Month] = __Min),[Recordings])
VAR __Month2 = MAXX(FILTER('Table',[Month] = __Max),[Recordings])
RETURN
__Month2 - __Month1
In reality, you will want a MonthSort column for Sort By and probably have to use that for your max/min, etc.
@Anonymous There is if you unpivot those month columns so that you have:
Month, Value
March, 1200
April, 1500
...
You could then do this:
Difference Measure =
VAR __Min = MIN('Table'[Month])
VAR __Max = MAX('Table'[Month])
VAR __Month1 = MAXX(FILTER('Table',[Month] = __Min),[Recordings])
VAR __Month2 = MAXX(FILTER('Table',[Month] = __Max),[Recordings])
RETURN
__Month2 - __Month1
In reality, you will want a MonthSort column for Sort By and probably have to use that for your max/min, etc.
Hi @Greg_Deckler ,
Really appreciate your help, that is definately best solution.
But what if I change the data little bit as below:
Can you pls help with this too @Greg_Deckler ?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
12 | |
11 | |
10 | |
9 |