Forum Discussion
Maintain Original Column Name in Report Builder Table
I am dragging columns from my datasource into a table in Power BI Report Builder. The column names include the use of the underscore when spaces are present i.e. "entry_nbr", "entry_summary_date". When put into the table, the header removes the underscore so that the output table shows spaces in the column title:
How do I maintain the original column titles? There are times I want the underscore to remain. Other times it may be ok, but this isn't one of them...
- Anonymous1 year ago
Hi RPYee , hello rohit1991, thank you for your prompt reply!
As far as I know, there is no way to change this default behaviour.As a workaround, we could set expression for each column, double click the filed you need to make it display underscore:
Additionally, you could also save the file first, then open the file in notepad, replace the column name in text editor:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- rohit1991
Super User
To maintain original column titles with underscores in Power BI Report Builder:
- Manually Edit Header Text: Click on the header cell and type the original name (e.g., entry_nbr).
- Check Dataset Query: Ensure column aliases in the query match the original names with underscores.
- Disable Auto Formatting: In the header cell properties, set Value to the exact column name (e.g., [entry_nbr]).
Preview the report to confirm changes.
- RPYeeFrequent Visitor
1. There are about 30 columns being pulled. I do not have the time, nor the patience, to manually edit every single column header. With a program as robust as PowerBI, I shouldn't have to!
2. Even when my query plainly states AS, with the underscore included, the underscore is being removed from the column header.
3. I cannot find this setting. Can you provide a bit more detail on where it is located?
- AnonymousNot applicable
Hi RPYee , hello rohit1991, thank you for your prompt reply!
As far as I know, there is no way to change this default behaviour.As a workaround, we could set expression for each column, double click the filed you need to make it display underscore:
Additionally, you could also save the file first, then open the file in notepad, replace the column name in text editor:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.