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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I need some help! I have been trying all day but to no avail.
I am trying to calculate the year difference in columns in a table. I have attached the model and table view below.
Any help would be appreciated!
I This is the data model
I want to compare 2017 to 2018, 2018 to 2019 and so on
Solved! Go to Solution.
@Anonymous , Create a separate year table. Say date
Date = Distinct(Table[Year])
Use these
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Value]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Value]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Use matrix Visual - https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
@Anonymous , Create a separate year table. Say date
Date = Distinct(Table[Year])
Use these
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Value]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Value]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Use matrix Visual - https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Hi @Anonymous
Do you have a short date column in your data model?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |