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 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.