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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AhmadBakr
Advocate II
Advocate II

Controlling exported data headers from a clustered bar chart

Hi...

 

I have a clustered bar chart, where both the x-axis and y-axis display information from field parameters which choose the selected fields from the fact table. When data is exported from the chart, 2 non-appealing issues happen:

 

  1. Exported data headers are reflecting the fact table name and columns names, or measure names if data is taken from measures!
  2. Dynmaic formatting string is added to the exported data table!

 

Exported data column headers appear like this

AhmadBakr_0-1754991155444.png

 

This is how the clustered bar chart is setup. "Category Label" is a parameter, and "Info Label" is a parameter

AhmadBakr_1-1754991304206.png

 

Category Label parameter definition: It is a 2 level parameter, user chooses either Item Category (Grp Label = 0) or business category (Grp Label = 1) controlled by the last column in the parameter table, then the corresponding parameter values (Catg-1 ...4 or Business Catg) are displayed

AhmadBakr_2-1754991345353.png 

AhmadBakr_4-1754991774033.png

 

 

Info Label parameter definition is again a 2 level field parameter. User chooses either Amounts (Group ID = 0) or PO Count (Group ID = 1) then the corresponding data is displayed (Ordered/Delivered amounts or PO Count)

AhmadBakr_3-1754991370351.png 

AhmadBakr_5-1754991843124.png

 

Is there a way to control the column headers in the exported data table and to prevent the dynamic format string from being exported?

2 ACCEPTED SOLUTIONS
jaineshp
Solution Sage
Solution Sage

Hey @AhmadBakr,

Looking at your clustered bar chart export issue, here are the practical solutions to control the exported data headers and remove dynamic formatting strings:

Solution Steps

1. Create Custom Column Headers Using DAX Measures

  • Replace your field parameters with calculated measures that return clean names
  • Use SELECTEDVALUE() function to dynamically return user-friendly labels
  • Example:

    Category Display =
    IF(SELECTEDVALUE('Category Label'[Category ID]) = 0, "Item Category", "Business Category")

2. Build Intermediate Summary Table

  • Create a summarized table using DAX that pre-formats your data
  • Use SUMMARIZECOLUMNS() or ADDCOLUMNS() to structure data with clean headers
  • This table becomes your chart's data source instead of direct field parameters

3. Remove Dynamic Formatting from Measures

  • Strip out FORMAT() functions from your measures used in the chart
  • Apply formatting only at visual level through Format pane
  • Keep raw numeric values in the underlying data model

4. Alternative Approach - Use Disconnected Tables

  • Create separate tables for your parameter values with clean display names
  • Use SWITCH() statements in measures to return appropriate values
  • Reference the display names instead of field names in your chart

5. Export Control Method

  • Before exporting, temporarily switch chart to use the cleaned measures
  • Or create a duplicate chart page specifically for export purposes with clean headers
  • Use bookmarks to quickly switch between display and export versions

Key Points:

  • Field parameters inherently carry technical names that appear in exports
  • DAX measures with proper naming give you full control over exported headers
  • Formatting should be applied at visual level, not in the underlying data measures
  • Consider creating export-friendly versions of your visuals for better user experience

This approach will give you clean, professional column headers in your exported data while maintaining the dynamic functionality of your parameters.

 

Fixed? ✓ Mark it • Share it • Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

View solution in original post

@jaineshp thank you for the detailed suggestion.

 

The challenge here is that I saw your suggestion very lengthy and will be very hard to maintain.

 

I reached to another way, and I was testing it... probably this is my reason for not reverting quickly:

 

  1. I created a duplicate version of my info measures, but unformatted
  2. I created an additional field parameter table which contains the new measures, and - to generalize the solution - ALL the fields of my fact table. For convenience I grouped related fields together, named it Export
  3. I added the Export parameter to a slicer, and made the slicer accepting multi selections
  4. I added the Export parameter to a table visual, but shrunk the table to a very small size not showing any values, as the aim of this table is to be used in data exporting for user convenience
  5. I grouped the slicer and the table

End result:

From User perspective:

The dashboard user has a sleek way to choose ANY fact table column, and export them to Excel

From Developer perspective:

- I have full control on the exported data column names, as they are taken from the field parameter table I created.

- And an easy to maintain setup.

 

Screen shots below:

AhmadBakr_0-1755177748874.png👈The table/slicer combo. Data export possible from the ellipses

 

AhmadBakr_2-1755177850089.png 👈 Options in the slicer based on the Export field parameter fields

 

AhmadBakr_3-1755177915405.png 👈The Export field parameter DAX code.

Note that the first column in the Export parameter table contains the lables of fields, which will be the column headers in the exported data --> developer controlled.

Last 2 columns are used in grouping similar fields to create a heirarchy in the slicer.

 

This is so, because I noticed that any visual other than the table (and matrix) visual does not contain column headers of course, thus it uses the columns/measures names, and to work around this would require a lot of work which I did not want to do. At the end it is one feature - data export - we are talking about. It does not have to be costly.

 

Appologies for the delay in responding to your effort.

And to @v-venuppu, I am not sure if I can mark 2 solutions? The only aim is to draw the attention any reader of this issue to the solution I managed in addition to the one suggested by Jainesh. The fact that it is offering a user-controlled export meachnism was very much appreciated by my dashboard users and I want to share the knowledge

View solution in original post

3 REPLIES 3
v-venuppu
Community Support
Community Support

Hi @AhmadBakr ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @jaineshp for the prompt response.

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

jaineshp
Solution Sage
Solution Sage

Hey @AhmadBakr,

Looking at your clustered bar chart export issue, here are the practical solutions to control the exported data headers and remove dynamic formatting strings:

Solution Steps

1. Create Custom Column Headers Using DAX Measures

  • Replace your field parameters with calculated measures that return clean names
  • Use SELECTEDVALUE() function to dynamically return user-friendly labels
  • Example:

    Category Display =
    IF(SELECTEDVALUE('Category Label'[Category ID]) = 0, "Item Category", "Business Category")

2. Build Intermediate Summary Table

  • Create a summarized table using DAX that pre-formats your data
  • Use SUMMARIZECOLUMNS() or ADDCOLUMNS() to structure data with clean headers
  • This table becomes your chart's data source instead of direct field parameters

3. Remove Dynamic Formatting from Measures

  • Strip out FORMAT() functions from your measures used in the chart
  • Apply formatting only at visual level through Format pane
  • Keep raw numeric values in the underlying data model

4. Alternative Approach - Use Disconnected Tables

  • Create separate tables for your parameter values with clean display names
  • Use SWITCH() statements in measures to return appropriate values
  • Reference the display names instead of field names in your chart

5. Export Control Method

  • Before exporting, temporarily switch chart to use the cleaned measures
  • Or create a duplicate chart page specifically for export purposes with clean headers
  • Use bookmarks to quickly switch between display and export versions

Key Points:

  • Field parameters inherently carry technical names that appear in exports
  • DAX measures with proper naming give you full control over exported headers
  • Formatting should be applied at visual level, not in the underlying data measures
  • Consider creating export-friendly versions of your visuals for better user experience

This approach will give you clean, professional column headers in your exported data while maintaining the dynamic functionality of your parameters.

 

Fixed? ✓ Mark it • Share it • Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

@jaineshp thank you for the detailed suggestion.

 

The challenge here is that I saw your suggestion very lengthy and will be very hard to maintain.

 

I reached to another way, and I was testing it... probably this is my reason for not reverting quickly:

 

  1. I created a duplicate version of my info measures, but unformatted
  2. I created an additional field parameter table which contains the new measures, and - to generalize the solution - ALL the fields of my fact table. For convenience I grouped related fields together, named it Export
  3. I added the Export parameter to a slicer, and made the slicer accepting multi selections
  4. I added the Export parameter to a table visual, but shrunk the table to a very small size not showing any values, as the aim of this table is to be used in data exporting for user convenience
  5. I grouped the slicer and the table

End result:

From User perspective:

The dashboard user has a sleek way to choose ANY fact table column, and export them to Excel

From Developer perspective:

- I have full control on the exported data column names, as they are taken from the field parameter table I created.

- And an easy to maintain setup.

 

Screen shots below:

AhmadBakr_0-1755177748874.png👈The table/slicer combo. Data export possible from the ellipses

 

AhmadBakr_2-1755177850089.png 👈 Options in the slicer based on the Export field parameter fields

 

AhmadBakr_3-1755177915405.png 👈The Export field parameter DAX code.

Note that the first column in the Export parameter table contains the lables of fields, which will be the column headers in the exported data --> developer controlled.

Last 2 columns are used in grouping similar fields to create a heirarchy in the slicer.

 

This is so, because I noticed that any visual other than the table (and matrix) visual does not contain column headers of course, thus it uses the columns/measures names, and to work around this would require a lot of work which I did not want to do. At the end it is one feature - data export - we are talking about. It does not have to be costly.

 

Appologies for the delay in responding to your effort.

And to @v-venuppu, I am not sure if I can mark 2 solutions? The only aim is to draw the attention any reader of this issue to the solution I managed in addition to the one suggested by Jainesh. The fact that it is offering a user-controlled export meachnism was very much appreciated by my dashboard users and I want to share the knowledge

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors