Forum Discussion
Anonymous
2 years agoNot applicable
DAX for date range lookup
Hi, Can anyone help me with a calculated column like highlighted below? So I have a DATEDIF of: TODAY() vs a Date column. The Date values can be in the past/present/future or blank. The DAT...
ryan_mayu
2 years agoSuper User
Anonymous
you can try this to create a column
Column =
VAR _dif=ABS('Table'[date]-today())
return SWITCH(TRUE(),_dif<=15,"A",_dif<=30,"B","C")
however, the problem is we can only assign blank to one category. So I didn't put it in the DAX.