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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 should be categorized in the 2-3 year (from today's date) category. Can anyone help me with the dax for this?
Solved! Go to Solution.
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
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!