Forum Discussion
lookingfo123
3 years agoNew Member
Categorize a year column
I have a column that tracks earliest retirement dates (its a date column). I need a new column that will break these out in to ranges. For example if the earliest retirement date is 02/02/2025, this ...
- 3 years ago
Hello lookingfo123 ,
You can do something as follow :
Category = SWITCH(YOUR_TABLE[DATE].[Year] - YEAR(TODAY()), 0 , "This year", 1 || 2, "2 to 3 years", 3 || 4 , "4 to 5 years", "Older")OR
Category = CONCATENATE(YOUR_TABLE[Date].[Year] - YEAR(TODAY()), " year")Have a nice day
Timuran
Resolver I
3 years ago
Hello lookingfo123 ,
You can do something as follow :
Category = SWITCH(YOUR_TABLE[DATE].[Year] - YEAR(TODAY()), 0 , "This year", 1 || 2, "2 to 3 years", 3 || 4 , "4 to 5 years", "Older")
OR
Category = CONCATENATE(YOUR_TABLE[Date].[Year] - YEAR(TODAY()), " year")Have a nice day