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 All,
I am currently struggling with an issue whereby I am comparing years of data against each other. My table looks similar to the one below:
| Year | Value |
| 2018 | 14706.92 |
| 2019 | 13193.76 |
| 2020 | 10926.98 |
I also have a year slicer, to select which year I am viewing as my "Current Year". I want to create a new measure, which will be my "Previous Year Value", which is filtered to the year before the selected "Current Year". I then want to be able to calculate the difference between the current year and the previous year values.
It would look something like this:
Please note if 2020 was selected, all of these values would dynamically update.
If anyone has a smart solution please let me know.
Solved! Go to Solution.
Hi, I actually managed to get a solution myself using a date dimension table.
This table was calculated with:
This got me the solution, thanks for everyones help anyway!
Hi,
The first Table you have shared in your initial post looks like a visual that you have created (Table or matrix) not your actual input table. Share your actual input table. Does the actual input table have a proper Date column?
Hi, I actually managed to get a solution myself using a date dimension table.
This table was calculated with:
This got me the solution, thanks for everyones help anyway!
Hi @Anonymous ,
We can try to create following three measures to meet your requirement:
Current Year Value =
CALCULATE ( SUM ( 'Table'[Value] ) )
Previous Year Value =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), [Year] = SELECTEDVALUE ( 'Table'[Year] ) - 1 )
)
Delta = [Current Year Value] - [Previous Year Value]
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous !
Have you tried Year to Date formula?
Hi @Anonymous , could you please expand on this? Not sure how this can solve my problem
How do you have your data organized? Is been your total value calculated by a DAX formula?
btw, this is what I refer to: https://docs.microsoft.com/es-es/dax/totalytd-function-dax
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!