Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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",....
The problem is there are more thn 100 countries.
What is the easiest way other than use if statements?
thank you in advance.
Solved! Go to Solution.
Put your data in a table and use a merge to match the short codes. You can return the country full name after that.
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:
Country Name =
SWITCH (
Table1[Noc],
"FRA", "France",
"GER", "Germany",
"ITA", "Italy",
"USA", "United States of America"
)
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:
Country Name =
SWITCH (
Table1[Noc],
"FRA", "France",
"GER", "Germany",
"ITA", "Italy",
"USA", "United States of America"
)
which part is causing you trouble?
Have you created the table?
col1 col2
FRA France
GER Germany
...
Thank you , finally i can do it, without using Merge, just created the table and make a relation with the other one and it works, thank you.
@HotChilli sorry i couldn't get it , can you show me a way to do that ? or anyway to make it with DAX
you could use a record as dictionary from short name to extenden name
let
dict=[fra="france",ger="germany",ita="italy",usa="united states of america"],
Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSitKVNJRSspJVIrViVZKTy1C4mWWIMuVFsN5sQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Colonna1 = _t, Colonna2 = _t]),
#"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"Colonna1", type text}, {"Colonna2", type text}}),
#"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "extended", each Record.Field(dict,[Colonna1]))
in
#"Aggiunta colonna personalizzata"
Put your data in a table and use a merge to match the short codes. You can return the country full name after that.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 18 | |
| 13 | |
| 9 | |
| 8 | |
| 8 |