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
User | Count |
---|---|
136 | |
84 | |
65 | |
60 | |
55 |
User | Count |
---|---|
213 | |
108 | |
86 | |
82 | |
76 |