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,
I have almost 400+ custom columns in a table as customfield_10750, customfield_10890 and so on.
Table 1
and i created another table with same column nams as attributes and their values as
Table 2
Now i want to replace all the column names in table 1 with the values of the attributes in table two.
Can anybody suggest how can i achieve this in Power query
Thanks
Solved! Go to Solution.
if there is no missing value between Attributes values and comlumn names of Table1, then this code may work
NewStep=Table.RenameColumns(Table1,Table.ToRows(Table2))
otherwise, try this code
=Table.RenameColumns(Table1,List.Select(Table.ToRows(Table2),each List.Contains(Table.ColumnNames(Table1),_{0},(x,y)=>x{0}=y)))
if there is no missing value between Attributes values and comlumn names of Table1, then this code may work
NewStep=Table.RenameColumns(Table1,Table.ToRows(Table2))
otherwise, try this code
=Table.RenameColumns(Table1,List.Select(Table.ToRows(Table2),each List.Contains(Table.ColumnNames(Table1),_{0},(x,y)=>x{0}=y)))
I tried this but getting this error
This is my Custom_Fields table
and this is my Actual Table in which i want to replace column names
I am not able to understand why it is throwing this error.
is it possible that there two or more "Enviroment" in the second column of Custom_Fields?
Yes Exactly this is happening. See this
Some values are repeating for same custom field
Hi @wdx223_Daniel ,
I think there is something bad with the data in Custom_Fields. For now i have remove duplicates from the Custom_Fields second column and now everything is fine 😊. Out of 413 rows 408 values left after removing duplicates so i need to check for those 5 duplicate values again. Thanks for your help and i am accepting your answer as solution 👍
thanks for the reply. I will check this and wll tell you about the result 😊
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 |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
11 | |
7 | |
6 | |
6 |