Forum Discussion
DAX Help With Nested If
- 6 years ago
Something like this?
Switch ( true ( )
, [field1] = blank() && [field2] = blank() , "double oops"
, [field1] = blank() , "type-1 oops"
, [field2] = blank(), "type-2 oops"
, "Undefined"
)
Hi Anonymous ,
Try using a SWITCH() Switch is a link to explanation, and there are a lot of videos out there as well.
SWITCH([Month],
1,"January",
2,"February",
"Some other month"
)
Takes a group of nested ifs and turns it into a readable function. The function stops at the first one that is true. I always think of it as a penny dropped into a pond, and if there is nothing to stop it (nothing true) then you get the value at the bottom.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel