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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Bastienlin_
Helper II
Helper II

Power Automate button - export pages to pdf or pptx problem

Hello, I am posting here because I got no reply in Power Automate Community.

I wanted to add a button to my PBI report to extract pages from this dashboard to PDF and send it to me by email.
The problem is that the filters I apply on the published version are not taken into account. For example when i select values in Slicers about the Date, I want it to be displayed on my extracted pdf version of my dashboard. Nevertheless it isn't the case as I still see the default state of my dashboard (the state when it is published into the PBI Service): I don't see that I selected a date on my slicer .

Did I miss something in my flow ? I only have 3 steps: 1. click on the button, 2. Export to fil for PBI (PDF or PPTX) 3. Send email.

Bastienlin__0-1654246234824.png

 


Thank you for your help !

1 ACCEPTED SOLUTION

ReportLevelFilter works just like URL filters which are explained here https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

 

If you can dynamically construct a string like this example:  "Store/Territory in ('NC', 'TN')" and pass it in the ReportLevelFilters it will filter your report accordingly.

 

View solution in original post

8 REPLIES 8
KiranHosakote
Helper V
Helper V

Hi @Bastienlin_ 

 

Unless you have a specific reason to use Power Automate, you can automate the selection of dynamic filter and slicer values at report run-time entirely within Power BI. See https://medium.com/p/bfebd39d4c84 for details.

KiranHosakote
Helper V
Helper V

Hi @Bastienlin_ ,

See this article for automated export of Power BI reports with filters and slicers applied to PDF / PPTX using BI Helper. 

https://medium.com/bi-helper/burst-your-power-bi-reports-838ab593f7bc

This tool works with a single Power BI Pro license. 

Bastienlin_
Helper II
Helper II

Hello, I am posting here because I got no reply in Power Automate Community.

I wanted to add a button to my PBI report to extract pages from this dashboard to PDF and send it to me by email.
The problem is that the filters I apply on the published version are not taken into account. For example when i select values in Slicers about the Date, I want it to be displayed on my extracted pdf version of my dashboard. Nevertheless it isn't the case as I still see the default state of my dashboard (the state when it is published into the PBI Service): I don't see that I selected a date on my slicer .

Did I miss something in my flow ? I only have 3 steps: 1. click on the button, 2. Export to fil for PBI (PDF or PPTX) 3. Send email.

Bastienlin__0-1654246234824.png

 


Thank you for your help !

AmosHersch
Employee
Employee

Hi @Bastienlin_ ,

 

The "export to file" API will always export the report in it's saved state.

You can't just make changes to the report without saving it, and expect the API to export it with your changes.

If you want to apply filters you can add filter to the request. For filters and slicers you can use bookmarks

 

Hello @AmosHersch,

So it is impossible to expect the "export to file" to be dynamic depending on the selections we do in the different slicers of the report ?
It is necessary that the print button take into account what we select in the slicers for the user...

Thank you for your answer !

@Bastienlin_  that's right, unless you have the Power BI report embedded in your own app, and then you can use Power BI Javascript API to capture bookmark of current state of the report, and provide that bookmark in the API request.

Hi @AmosHersch,

Do you know if we can use a solution by including the fields in the Power Automate visual ? 
For example I tried if I can get different Dates by triggering the flow with my button, without saving the report and it worked, I tried several times and I received emails with different date.
With this step:

Bastienlin__0-1654765733603.png
By doing it 2 times with 2 different dates without saving my report, I am able to get the 2 values I selected:

Bastienlin__4-1654766130982.pngBastienlin__5-1654766165197.png

 



I thought I could do the same but putting this "Element" Field or "Entity" Field in the ReportLevelFilters Filter from the Export to File step, but it doesn't filter the report:

Bastienlin__3-1654765936940.png

  1. Do you know if I can use this Element field to make the Export to File dynamic with what the user select without saving it ?

  2. And do you know how the ReportLevelFilters Filter work ? I really thought it would work like this...

 

Thank you for your help !

ReportLevelFilter works just like URL filters which are explained here https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

 

If you can dynamically construct a string like this example:  "Store/Territory in ('NC', 'TN')" and pass it in the ReportLevelFilters it will filter your report accordingly.

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.