Forum Discussion
Include active slicer selections in table visual Excel export in a single click
- 2 months ago
Hi ANKamdeepu
The cleanest native way to achieve a single-click export that bundles both your detailed report data and your dynamic filter summary into a single Excel file is to merge both components into a single, cohesive Matrix visual layout on a hidden or dedicated "Export" tab. Because Power BI's native export engine only extracts the specific data underlying a single selected visual at a time, you can design a Matrix where your CONCATENATEX filter summary measures are placed directly in the Rows or Columns field well as a top-level hierarchy header, while your actual detailed report columns populate the subsequent nested rows or values section. When users click "Export data" and choose the "Data with current layout" option from this unified Matrix, Excel will generate a single sheet that preserves the hierarchy, cleanly displaying your flattened field parameter and dimension filter strings right alongside the structured table rows in one shot. If a strict tabular format is required instead of a matrix hierarchy, your only other native option is to inject your CONCATENATEX summary string directly as an additional repeating measure column inside your standard Table visual; while this repeats the filter text on every row, it natively forces all data points into a single exportable visual block without relying on external automation or script tools.
The cleanest native pattern for this is a Power BI paginated report visual on your report page. Build a paginated report in Power BI Report Builder against the same semantic model with two tablixes (one for the data, one for the slicer-context CONCATENATEX measures), then drop the paginated report visual on the page and bind its parameters to the same fields as your slicers. When the user opens the visual's menu and picks Export, the Excel file contains both tablixes in a single workbook in one click, with the current slicer state applied.
If you want to stay inside one regular table visual, the simpler trick is to add the CONCATENATEX filter-context measures as extra columns on the data table itself. They render the same value across every row and ride along when that visual is exported to Excel, so the filter context ends up in the same file with one click.
If this helped, a thumbs up and accepting the solution would be appreciated.
Thanks,
Shai Karmani
Hi Shai - Thank you very much for the quick response and for the options provided. While I like the first option, there is 2 limitations.
1) On the report page, I have a graph visual that has interactivity, which I can't do without.
2) There are 7 slicers on the report and 4 of them slicers have Field Parameters. Not sure if I can include Field Parameters in a Paginated report.
Coming to your 2nd approach, I was infact leaning towards this but when no slicer filters are selected, one of the column returns around 4000 values for each date, and 3 other dimensions combination.
Again thank you for your response and inputs.
Thanks,
Deepthi