Forum Discussion
ravitejaballa
4 years agoHelper III
Filter Slicer on multiple condition
Hi, I have data like below and I have a slicer (Expired, Expiring Within 90 Day, Terminated) using which I should filter data Expired = Should show all records where the End date is less than to...
amitchandak
4 years agoSuper User
ravitejaballa , try with this change
Slicer Flag =
var EndDateDiff = DATEDIFF(NOW(), Data[End Date], DAY)
var terminated = IF(Data[State] = "inactive", TRUE(), FALSE())
var within90days = IF(AND(EndDateDiff > 0, EndDateDiff <= 90), TRUE(), FALSE())
var expried = IF(EndDateDiff < 0, TRUE(), FALSE())
RETURN
Switch( True() ,
terminated, 3,
expired,1 ,
within90days,2,
0)
ravitejaballa
4 years agoHelper III
amitchandak is there a way to do using measures ?