Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

Renaming multiple custom columns based on group id

I have to show table/matrix with more than 30 fields where 8 of them are custom fields.These custom fields names are customfield1,customfield2,customfield3,.....,customfield8. These fields are created by group admin according to their requirements so the number of custom fields they create will be different(max 8 fields) and the field names also. I am getting all the values of custom fields from the customfields1,2,...8 columns. Headers for custom fields should be dynamic based on the groupid
For that i have another table(CF Table) with following columns orderid(upto 8),groupid,userid,fieldname,fieldvalue.
This is an embedded report, so that the viewers will only get to see the data of one group which is their own.
The orderid 1 to 8 represents the customfield1 to customfield8 and buid is the groupid.



The values of the custom fields are available in both table but the header name is only available in CF Table. I want to rename the custom fields1 to 8 to their respective field name based on the groupid. 

Thank you.

Community Support
Community Support

Hi @lwgpowerbiadmin ,


You can do it in Power Query Editor.



For the solution, please refer to:

Rename column names in a dynamic way with #Excel #PowerQuery | wmfexcel



Best Regards,

Stephen Tao


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for replying.
The given solution will not work as the customfields are already assigned in the matrix.
The matrix visual will display error if the field name does not match. we cannot change the fields in the matrix every time.
In the matrix all the customfields values are coming correctly but the column header won't change. I have another table for this dynamic header for the custom fields.
The matrix have static fields,DAX measures and 8 dynamic custom field that can change according to group.
Solution needed for changing custom fields header name according to the groupID in a matrix/table.


Helpful resources


Fabric certifications survey

Certification feedback opportunity for the community.


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.