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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

AhmadBakr

Set a visual to allow report users dynamically select fields to export

Problem statement: If users of your PBI report want to export data:

  1. You need to enable the visual header icon - more options for each visual your want users to be able to export from.
  2. Further more, users will be able to export fields only available in that visual.
  3. Additionally, if the visual is not a table or a matrix
    1. You have no control over column headers of exported data, they will show your Fields/measures names.
    2. , If you have dynamically formatted measures, you will get a column containing the format string exported for each dynamically formatted measure.

 

Better Approach:

Create a visual dedicated ONLY for data export and put in it all what you think your users might need to export and make its fields dynamically selectabel! Here is how...

  1. Create a Field parameter and include in it all your tables columns and measures you think users might need to export, let's name it Export, and the parameter column name is Value.
  2. Create a slicer using Export[Value].
  3. Format the slicer setting Style to drop down and selection to Single Select (off) and Multi-select with CTRL (off). This will make the fields selectable via check boxes.
  4. Create a table visual also using Export[Value].
  5. Switch off the text wrap from the table values and table column headers.
  6. Set the table title to "EXPORT".
  7. Shrink the table column widths to be all zeros, and the table hight to be just accomodating the title.
  8. Layer the slicer to be on top of the table using the selection pane.
  9. Ensure that header icons are switched off for the slicer and all other visuals, and switched on only for the table with only "more options" icon selected
  10. Group both visuals

 

Now your users can use the slicer to choose all the fields they want, then click on the ellipsis and export these fields to an excel file.

 

Note that:

  1. You have full control over the field names using the Export[Value] column in the field parameter table.
  2. User has full control over what they want to export.
  3. Exported data will be reflecting all user applied selections and filters.
  4. Bonus tip: in the parameter table you can add one more column to categorize the fields and use it in the slicer to group similar fields under a category.

Will look amazing 🌟

AhmadBakr_2-1755786492784.png

AhmadBakr_3-1755786522082.pngAhmadBakr_4-1755786590552.png 

AhmadBakr_5-1755787419341.png

 

 

 

Comments