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
I have a table roughly like this called 'Standard'
| Version | Product | Month | Amount |
| 2212 | A | 2304 | 100 |
| 2301 | A | 2304 | 50 |
And a table called 'Version'
| Version | Previous | Previous Previous |
| 2212 | 2211 | 2210 |
| 2301 | 2212 | 2122 |
In my visualization I have a slicer to choose Version and in the matrix I want to show (if I have selected 2301 as the version)
| Product | Month | Current amount | Previous amount |
| A | 2304 | 50 | 100 |
The current amount is easy, but how do I calculate the previous amount? I tried something like
Solved! Go to Solution.
Hi @vipett ,
You can create a measure as below to get it, please find the details in the attachment.
Previous amount =
VAR _previous =
CALCULATE (
MAX ( 'Version'[Previous] ),
FILTER ( 'Version', 'Version'[Version] = SELECTEDVALUE ( 'Standard'[Version] ) )
)
RETURN
CALCULATE (
SUM ( 'Standard'[Amount] ),
FILTER ( ALL ( 'Standard' ), 'Standard'[Version] = _previous )
)
Best Regards
Hi @vipett ,
You can create a measure as below to get it, please find the details in the attachment.
Previous amount =
VAR _previous =
CALCULATE (
MAX ( 'Version'[Previous] ),
FILTER ( 'Version', 'Version'[Version] = SELECTEDVALUE ( 'Standard'[Version] ) )
)
RETURN
CALCULATE (
SUM ( 'Standard'[Amount] ),
FILTER ( ALL ( 'Standard' ), 'Standard'[Version] = _previous )
)
Best Regards
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!