Forum Discussion
Create a List of Years
- 9 years ago
Hi pierre415,
Based on my test, you should also be able to use the formula(DAX) below to create a new calculate table to make an automated list of past 5 years that updates itself over the years. :smileyhappy:
Year = DISTINCT ( SELECTCOLUMNS ( CALENDAR ( DATE ( YEAR ( TODAY () ) - 4, 1, 1 ), TODAY () ), "Year", YEAR ( [Date] ) ) )Regards
Thanks, I'm looking to make an automated list that updates itself over the years though
Hi pierre415,
Based on my test, you should also be able to use the formula(DAX) below to create a new calculate table to make an automated list of past 5 years that updates itself over the years. :smileyhappy:
Year =
DISTINCT (
SELECTCOLUMNS (
CALENDAR ( DATE ( YEAR ( TODAY () ) - 4, 1, 1 ), TODAY () ),
"Year", YEAR ( [Date] )
)
)
Regards
- pierre4159 years ago
Helper I
That's awesome, thank you
- Anonymous3 years agoNot applicable
Hi,
I was struggling with the same issue, so this helped me a lot. The only thing I can't get to work is that I would like to have the number of years to "look back" based on a parameter that can be input. The provided solution does not seem to allow to use a input parameter for the calculation of the start date year. 😫