Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to switch values for a variable with text containing ""

I am trying to create a new column in which I group values from another variable. One of the values (Old 6 below) from the other column contains "", and the DAX-function is not accepting this, whe...
  • Tahreem24's avatar
    4 years ago

    Anonymous , Try this:

    New Column = SWITCH(TableName[Old],
    "Old 1","New 1",
    "Old 2", "New 1",
    "Old 3","New 1",
    "Old 4", "New 2",
    "Old 5","New 2",
    "Old 6", "New 3",
    "Old ""6""", "New 3",
    "Other")