This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
New to power query, so hoping for some help whilst I learn. Thanks in advance
I have a master table with column names which are codes e.g. XCGY, CHTY, HGFT, etc
i have a secondary table where column 1 is the list of codes and column 2 contains the useful column name I would like to use.
Can I use power query to quickly rename all columns in table 1 based on the info from table 2?
Solved! Go to Solution.
Assume your translation table is named Translate with the columns Code and Friendly
Table.RenameColumns(#"Step to Rename",List.Zip({Translate[Code], Translate[Friendly]}), MissingField.Ignore)
Translate Table
Table with code names
Sample Code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RYzBDoAgDEP/ZWf+CDigloxEIRnj4N87lxgv3fraNEZSbpPCdxiClOwp/aAcIjn9pbZezvP2SBlGJvZh3UB9XRvEp+B5bTLVvCPBW65jiTLl/AA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [abc = _t, ghi = _t, def = _t, jkl = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"abc", type text}, {"ghi", type text}, {"def", type text}, {"jkl", type text}}),
#"Rename Columns" = Table.RenameColumns(#"Changed Type",List.Zip({Translate[Code], Translate[Friendly]}), MissingField.Ignore)
in
#"Rename Columns"
with Columns Renamed
Assume your translation table is named Translate with the columns Code and Friendly
Table.RenameColumns(#"Step to Rename",List.Zip({Translate[Code], Translate[Friendly]}), MissingField.Ignore)
Translate Table
Table with code names
Sample Code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RYzBDoAgDEP/ZWf+CDigloxEIRnj4N87lxgv3fraNEZSbpPCdxiClOwp/aAcIjn9pbZezvP2SBlGJvZh3UB9XRvEp+B5bTLVvCPBW65jiTLl/AA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [abc = _t, ghi = _t, def = _t, jkl = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"abc", type text}, {"ghi", type text}, {"def", type text}, {"jkl", type text}}),
#"Rename Columns" = Table.RenameColumns(#"Changed Type",List.Zip({Translate[Code], Translate[Friendly]}), MissingField.Ignore)
in
#"Rename Columns"
with Columns Renamed
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 3 | |
| 1 | |
| 1 |