Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I have uploaded a CSV file into my PBI project. As the CSV file has no headers, column names in Table1 are shown as Column1, Column2, Column3, ......, Column100.
How can I replace those names for the ones that I have defined in Table2.
Many thaks for your help
Solved! Go to Solution.
HI @underkar,
Based on double check on your snapshot, it seems like your columns are stored in table 2 with original column name and real column name.
For your scenario, I modify my formula to use table 2 columns to generate name parameter list which need to be use in table 1.
#"Renamed Columns" = Table.RenameColumns(#"Source",List.Zip({Table2[Column],Table2[Description]}))
Regards,
Xiaoxin Sheng
HI @underkar,
You can use List.zip, Table.Renamecolumns and Table.ColumnNames functions to auto rename one table names based other table.
Sample:
#"Renamed Columns" = Table.RenameColumns(#"Previous Step",List.Zip({Table.ColumnNames(#"Previous Step"),Table.ColumnNames(Sheet2)}))
Regards,
Xiaoxin Sheng
Hi @Anonymous, thanks you very much for your reply.
I think this code doesn't work in my example, because I don´t need to replace headers in "table1" with headers in "table2", what I need is to lookup Column1, Column2, etc in "table2" and return the text in column "Description" of "Table".
I hope I have explained this better....
#"Renamed Columns" = Table.RenameColumns(#"Source",List.Zip({Table.ColumnNames(#"Source"),Table.ColumnNames(Table2)}))
Many thanks
HI @underkar,
Based on double check on your snapshot, it seems like your columns are stored in table 2 with original column name and real column name.
For your scenario, I modify my formula to use table 2 columns to generate name parameter list which need to be use in table 1.
#"Renamed Columns" = Table.RenameColumns(#"Source",List.Zip({Table2[Column],Table2[Description]}))
Regards,
Xiaoxin Sheng
Thanks Xaoxing!! It works!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
66 | |
61 | |
46 | |
45 |