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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rohithkothaneth
Resolver I
Resolver I

Dynamically export the report pages to PDF based on slicer value which is driving a Power Bi report

Hello,

 

I have a Power BI desktop report which is driven based on a column value "Client name" within a "Customer" table. Here the same column value is used as a slicer to populate visuals in the remaining pages of the same report. Basically Im trying to dynamically loop through values of a slicer, populate automatically the visuals remaining pages based on the value selected and extract all report pages for that value into a PDF file and then move on to the next value until it reaches the end of the slicer values. I'm using Power Automate to export the report in the PDF format, but haven't found a solution yet.

 

These are my report criterias

* I have multiple pages in my Power Bi report, the first page contains the slicers and an Power Automate execute button.
* The execute button would be triggered a flow in the Power Automate flow.
* Would want the value to loop through and apply the filter values in sequential order and extract the report pages to indicual PDF for the selcted slicer value and drop to a sharepoint site or folder specified.
* Power automate flow will need to end when the slicer value has been reached.

 

Could anyone please share the steps needed in the Power automate flow to achieve this scenario, your input is much appreciated.

 

Thanks,
Rohith

2 ACCEPTED SOLUTIONS

It works for me - check your data model and your table and column spelling.  As you mentioned you can use the report URL for checking that it filters correctly. 

View solution in original post

It was not working because, i had set the slicer to have a mandatory "Single selection" turned ON. Once I remove that, I was able to successfully test this by passing filter value as  a header in the URL. Same was dynamically generated in Power automate flow and passed within the filter parameter section for the "Exporting a PDF of the PBI report" connector in Power autiomate.

 

https://app.powerbi.com/groups/******/reports/******/ReportSection*****?filter=<Table name>/<column name> eq '<column value>'

Thank you for confirming that this solution works.

View solution in original post

8 REPLIES 8
rohithkothaneth
Resolver I
Resolver I

What I mean by URL is the power BI service URL after passing filter values within the URL header.
I did tried to passed in the rpeort filter section at the time of "Exporting a PBI report" but Power automate couldnt apply those column value back into the power Bi report into the slicer section to refresh the visual in the report pages.

It works for me - check your data model and your table and column spelling.  As you mentioned you can use the report URL for checking that it filters correctly. 

It was not working because, i had set the slicer to have a mandatory "Single selection" turned ON. Once I remove that, I was able to successfully test this by passing filter value as  a header in the URL. Same was dynamically generated in Power automate flow and passed within the filter parameter section for the "Exporting a PDF of the PBI report" connector in Power autiomate.

 

https://app.powerbi.com/groups/******/reports/******/ReportSection*****?filter=<Table name>/<column name> eq '<column value>'

Thank you for confirming that this solution works.

lbendlin
Super User
Super User

Add your filter column to the Power Automate visual and then use that data to specify the export filters in Power Automate.

Thank you @lbendlin for your response.
when I add the filetre column to my power automate visual, i can use the value inside the power automate, but when i want the same filter values to go through a loop and apply back to report so thet visuals in the pages changes accordingly for me to export is where it is not working. Every time I loop through the list and try to apply different value to generate the visual and when tried to export the report into a PDF, the report output comes with the default selection and doesnt gets changes based on the filter value that i apply through power automate.

Attached my flow that I cerated  for your reference.

Thanks,
RohithPower automate flow - 1Power automate flow - 1Power automate flow - 2Power automate flow - 2Power automate flow - 3Power automate flow - 3

You didn't apply the report level filter(s).

My report page visuals are driven by the slicer value which is also based on the same column that i have passed to the power automate. I tried to pass the value as a filter in the URL, but the slicer doesnt get chnaged. It needed be picked manually to get ti changed. Is there a way for me to interact with the slicers via any means.
I tried addinga report filter but the slicer didnt get changed.

 

I tried to pass the value as a filter in the URL

What URL?  This needs to be in the Power Automate export step.  Make sure to specify both the table and the column name, and to escape special characters.  (Like you would do in the URL)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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