Forum Discussion
Dynamic date difference
- 1 year ago
Hello Dodo96
DAX for calculated column
Date Range Category =
VAR SelectedMaxDate =
CALCULATE (
MAX ( 'Calendar'[Date] ),
ALLSELECTED ( 'Calendar' )
)
VAR DaysDiff =
DATEDIFF ( Table1[Date], SelectedMaxDate, DAY )
RETURN
SWITCH (
TRUE(),
DaysDiff <= 30, "Within 30 days",
DaysDiff <= 60, "31 to 60 days",
DaysDiff > 60, "Over 60 days",
BLANK()
)
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi Dodo96
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.