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.
Please can someone help me with a calculated column in Dax, I want a numerical value representing the number of years prior to the current year based on a [Date] column. So the current year of 2022 = 0, 2021 = 1, 2020 = 2, 2019 = 3 and so on. I don't mind if it's negative values: 0, -1, -2 -3.
Thanks in advance!
Solved! Go to Solution.
@JemmaD Try:
Column =
VAR __CurrentYear = YEAR(TODAY())
RETURN
__CurrentYear - YEAR([Date])
@JemmaD Try:
Column =
VAR __CurrentYear = YEAR(TODAY())
RETURN
__CurrentYear - YEAR([Date])
Thanks Greg that was perfect