Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Date IF Statement
Hi, I'm trying to do a simple IF Statment but it doesn't seem to work; I'm trying to created a calculate column to use as a customer filter. I'm looking at 3 Columns as listed below: (...
- 6 years ago
Hi Anonymous
Do you check my answers above?
these are all measures instead of columns
max selected = MAX('calendar'[Date]) Measure = IF([max selected]>MAX([start])&&[max selected]<=MAX([end]),"Include","exclude")Best Regards
Maggie
Anonymous
6 years agoNot applicable
Hi FrankAT
Yeah these are for sure Calender dates!
v-juanli-msft I tried changing the date slicer but this returned the same result! also this shouldn't make a diffrence as the Dax is going off the [Date_Selected} Column not the acutal slicer...
Thanks
Rob
Anonymous
6 years agoNot applicable
try this?
Report Filter =
var _selectedDate = CALCULATE(max('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))
var IncExc = if( _selectedDate > calculate(firstdate('Table'[from]),'Table')
&& _selectedDate <= calculate(firstdate('Table'[to]),'Table'),
"Include",
"Exclude"
)
return IncExc