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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
lwgpowerbiadmin
Frequent Visitor

Renaming multiple custom columns based on group id

Hi
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.

lwgpowerbiadmin_0-1647241603816.png

lwgpowerbiadmin_0-1647242756438.png

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.

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @lwgpowerbiadmin ,

 

You can do it in Power Query Editor.

Example:

excel-tip-rename-column-names-in-a-dynamic-way.png

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.

Hi
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.

Thanks

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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