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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Datta_A
New Member

Issue with Power BI Embedded Report Export in Salesforce – Filtered Data Not Exporting Correctly

Hello everyone,

I'm currently working with Power BI embedded reports inside Salesforce and encountering an issue when trying to export filtered reports to PDF.

Context:

  • The report has slice filters and a date filter.
  • When the report loads for the first time inside Salesforce, everything works correctly, and the data is displayed as expected.
  • However, after applying any filter on the embedded report and attempting to export the filtered report using the Export button, the data does not reflect the applied filters in the exported file.

What Happens:

    • The Export button internally makes a call to the following API endpoint:

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/exports/{exportId}/file

  • The export process completes successfully, but the PDF file does not include the filtered data; instead, it shows the original unfiltered report data.

What I’ve Tried:

  • I verified that the filters are applied correctly on the report before exporting.
  • The API call seems correct as the export works, but the filtered data isn't carried over to the export.

Questions:

  • Has anyone encountered this issue where filters applied to an embedded Power BI report are not reflected in the exported version?
  • Is there a specific Power BI API parameter or setting I
2 REPLIES 2
v-jtian-msft
Community Support
Community Support

Hi,lbendlin ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hello,@Datta_A .I am glad to help you.

After my testing, there is no problem with this Power BI Service api. The reason you are experiencing exported report files with no filters applied when using this API could be due to the incorrect application of the filters parameter. Resulting in the parameter not being passed correctly.
Here is my test procedure, hope it will help you

According to the description, you are using this API

 

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/exports/{exportId}/file

 

URL:Reports - Get File Of Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft L...

vjtianmsft_0-1727183420300.png


Note that the ExportID parameter passed in here needs to be obtained from other APIs that have filter report functionality.
I use this API: Exoprt To File

vjtianmsft_1-1727183464345.png

URL:
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
 

It is a post request asking the user to pass the relevant filtering information for the target report, which will return an exportID after a successful run.

My complete process is as follows:
1. Use “Export To File” API

vjtianmsft_3-1727183712651.png

 

vjtianmsft_4-1727183721264.png

Successful execution will fetch the reportID: (which is actually the id) of the filter that has been applied.

vjtianmsft_5-1727183808922.png

Get the ExportID parameter and fill it into the API you provided (i.e., the “id” you got after the previous API ran successfully).

vjtianmsft_6-1727183845528.png

Since my attempt was Try it, when I scripted it in python, I was able to successfully implement exporting the report with filters applied.

vjtianmsft_7-1727183931273.png

After my test, after the api export export pdf final results for the Power BI Service on the application of the screening conditions and display results

vjtianmsft_8-1727183980312.png

I tried to modify the visual from table to matrix on service and after running the export api and Get file of export to file api, the format of the export file is the final modified result displayed on service.
The status of the report on the service

vjtianmsft_9-1727184013538.png

One thing to note: the API you mentioned needs to work with Export to file / Export to file in group (I tested Export to file).
There are official restrictions on the use of these two APIs in embedded reports.
URL.

Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Announcing Persistent Filters in the Power BI Service | Microsoft Power BI Blog | Microsoft Power BI
 

vjtianmsft_10-1727184059915.pngvjtianmsft_11-1727184067185.png

So my preference for the problem you are experiencing is more of a known limitation.
I hope my test was helpful.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Show your work - how do you specify the filters,  are the filter columns and tables present in the data model, do they actually control the data model?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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