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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
In my current dataset, there are values for two waves in each year. The ideal output is to have a slicer to select any of the two waves and the matrix table will show the differences between the older wave and newer wave selected.
E.g.,
Please advise how I can set up this matrix table. Thank you!
Current dataset
Solved! Go to Solution.
Hi @lsihui_
Create a separate dimension table for Year/Wave and then create this measure:
Difference =
VAR FirstSelected =
CALCULATE ( MIN ( YearWave[Year/Wave] ), ALLSELECTED ( YearWave ) )
VAR SecondSelected =
CALCULATE ( MAX ( YearWave[Year/Wave] ), ALLSELECTED ( YearWave ) )
VAR FirstValue =
CALCULATE (
SUM ( Data[Value] ),
KEEPFILTERS ( YearWave[Year/Wave] = FirstSelected )
)
VAR SecondValue =
CALCULATE (
SUM ( Data[Value] ),
KEEPFILTERS ( YearWave[Year/Wave] = SecondSelected )
)
RETURN
SecondValue - FirstValue
The measure will return the difference between max and min selected values. Selections in between these are ignored.
Please se the attached sample pbix.
Hi @lsihui_
Create a separate dimension table for Year/Wave and then create this measure:
Difference =
VAR FirstSelected =
CALCULATE ( MIN ( YearWave[Year/Wave] ), ALLSELECTED ( YearWave ) )
VAR SecondSelected =
CALCULATE ( MAX ( YearWave[Year/Wave] ), ALLSELECTED ( YearWave ) )
VAR FirstValue =
CALCULATE (
SUM ( Data[Value] ),
KEEPFILTERS ( YearWave[Year/Wave] = FirstSelected )
)
VAR SecondValue =
CALCULATE (
SUM ( Data[Value] ),
KEEPFILTERS ( YearWave[Year/Wave] = SecondSelected )
)
RETURN
SecondValue - FirstValue
The measure will return the difference between max and min selected values. Selections in between these are ignored.
Please se the attached sample pbix.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!