I have a function in excel table like below:
LOOKUP([ActivitySinceRegistration],{-65535,0,30,60,90,120,150,180,65535}, {"Not active at all","Active in 30 days","Active in 60 days","Active in 90 days","Active in 120 days","Active in 150 days","Active in 180 days","Inactive more than 180 days"})
Now I want to do the same in DAX, how should I do it? I'm thinking of using switch, but it seems like only handles discrete values like below? But I want it to handle the above case.
=SWITCH([Month], 1, "January", 2, "February", 3, "March", 4, "April"
, 5, "May", 6, "June", 7, "July", 8, "August"
, 9, "September", 10, "October", 11, "November", 12, "December"
, "Unknown month number" )
Thanks in advance.
LOOKUP([ActivitySinceRegistration],{-65535,0,30,60,90,120,150,180,65535}, {"Not active at all","Active in 30 days","Active in 60 days","Active in 90 days","Active in 120 days","Active in 150 days","Active in 180 days","Inactive more than 180 days"})
Now I want to do the same in DAX, how should I do it? I'm thinking of using switch, but it seems like only handles discrete values like below? But I want it to handle the above case.
=SWITCH([Month], 1, "January", 2, "February", 3, "March", 4, "April"
, 5, "May", 6, "June", 7, "July", 8, "August"
, 9, "September", 10, "October", 11, "November", 12, "December"
, "Unknown month number" )
Thanks in advance.