Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

CASE Complex statement in DAX

Hello! 🙂  I am trying to "translate" a complex case statement in DAX. I have tried 'Switch function' and it's OK:   New field = SWITCH (         TRUE (), table1[Category] = "hair-color", "LUXE"...
  • amitchandak's avatar
    5 years ago

    Anonymous , You can try like

    New field = SWITCH (
    TRUE (),
    table1[Category] in ("hair-color","hair-care","hair-style"), "LUXE",
    "Other"
    )

     

    But if need to search then you need use search, check

    https://youtu.be/mZt0HJw4gjQ