Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Multiple IF Statements (50+)

Hello everyone, i have a cloumn full of abbrevations, i need to create a new column with full name   (eg. COUNTRY NAME = IF(Table1[Noc] = "FRA", "France",IF(Table1[Noc] = "GER", "Germany",.... T...
  • HotChilli's avatar
    4 years ago

    Put your data in a table and use a merge to match the short codes.  You can return the country full name after that.

  • AlexisOlson's avatar
    4 years ago

    For that many, you almost certainly want to use a table as HotChilli recommends.

     

    I just wanted to mention the SWITCH function which is much cleaner than IF in these sorts of situations:

    https://dax.guide/switch/

     

    Country Name =
    SWITCH (
        Table1[Noc],
        "FRA", "France",
        "GER", "Germany",
        "ITA", "Italy",
        "USA", "United States of America"
    )