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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JDBOS
Helper III
Helper III

Filter passed by URL not respected when exporting Power BI report to pdf

We have a report that receives a Record ID via a URL and the Record ID is then used to filter all pages.

Although we realize that per the article: Export reports from Power BI to pdf

"URL filters aren't currently respected when you choose Current Values for your export..."

We're hoping someone may have found a work-around.

 

Since it's just a record ID, is there an easy way for the user to "copy and paste it" so it's then considered a "changed filter value"

Just editing and re-entering doesn't seem to work - seems like the URL that includes the filter may be part of the problem.

 

Thanks in advance for your coaching!

2 ACCEPTED SOLUTIONS

I would suggest having the filter that could be entered might be the way to get it working going forward.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

v-yingjl
Community Support
Community Support

Hi @JDBOS ,

As mentioned in the article, the URL filters is not supported when exporting to PDF currently. Also, based on my research, I have found other considerations that URL filters are supported in some embedding scenarios and not in others:

So if you want to use filter to export, maybe you could filter in the report in advance then export to pdf instead of using URL filters.

For more information about URL filter, please refer the microsoft document that could hope to help you: URL filters 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13
TarRob
New Member

@JDBOS 

Have you found that this has stopped working?  Yesterday this was working as per the solution detailed here but no longer.

Report opens up pre filtered, they confirm the selection and then export the to PDF, the PDF comes out unfiltered!

Yet, if they go to the report without the filtering in the URL and filter it in the report, it PDF's fine.

 

Pre filtering with URL so user only needs to select the one option of projectID.  Filters no longer persist like this.  Anyone elses experencing this?

TarRob_0-1695719118050.png

 

@TarRob let me do some testing - it's been a while since I looked at this functionality... but frustrating when it doesn't work 

Kyle14
Frequent Visitor

Found a work around for this that I've recently implemented in one of my reports.

 

The query string parameter filter I'm using is to filter a report based on [client name] and I only need one client selected for a report print out. I added the following measure:

Client Filter = IF(HASONEVALUE(Data[Client Name]),SELECTEDVALUE(Data[Client Name])=FIRSTNONBLANK(Data[Client Name],1),0). I added a slicer on the page with [client name] in the field well. I then added the created Client Filter measure to the slicer visual filter. Applied the filter for Client Filter is not 0. I updated the slicer to single selection (I'm using the chiclet slicer visual and chose force selection option). Then the trick is to have the filter exposed and layered behind another visual, that will be hidden to the user and non-actionable. Then sync the slicer to the rest of the pages in the report (mine has 20+ because its a deliverable to the client) and this will keep the applied Client Filter on the slicer and those can be hidden on the rest of the pages. But, the slicer needs to be visible on the first page, just blended into the canvas background or layered behind other visuals so the user doesn't know. 

 

are you saying that you completed these steps and your export PDF/PPTX held the filters shown in the slicer, which is the same "client" as shown in the Query String filter ?

 

Correct. I have a "landing page" for the users to select the client and query string URL will be attached to the coverage data (insurance) we have on them. The user can click on the coverage link and be directed to the coverage report filtered for the selected client. Export using the steps I outlined above holds the filter selection. Screenshots below.

Landing page

 

Kyle14_0-1672253370285.png

filter coming from query string parameter

Kyle14_1-1672253463738.png

 

filter on hidden slicer visual. The filter on this visual for "is not 0" manufactures a single select

Kyle14_2-1672253579664.png

 

Screenshot of export to PPT

Kyle14_3-1672253832288.png

 

 

@Kyle14 
This formula works perfect for a single selection:
Client Filter = IF(HASONEVALUE(Data[Client Name]),SELECTEDVALUE(Data[Client Name])=FIRSTNONBLANK(Data[Client Name],1),0).

Do you have any ideas for a Multiple Selection concept, using the Slicer w/ Visual-level filter workflow ?

I also built a Landing page concept..interesting that 2 people had to go down this road.

Im having one issue:
I updated the slicer to single selection (I'm using the chiclet slicer visual and chose force selection option).
Where is the Force Selection Option ?  

I found the Chiclet slicer you used in the Marketplace...just in case someone ends up here.  Its the only one with a Force Selection option.  I couldnt get any other slicer to work that was in the default installation of PBI desktop.

v-yingjl
Community Support
Community Support

Hi @JDBOS ,

As mentioned in the article, the URL filters is not supported when exporting to PDF currently. Also, based on my research, I have found other considerations that URL filters are supported in some embedding scenarios and not in others:

So if you want to use filter to export, maybe you could filter in the report in advance then export to pdf instead of using URL filters.

For more information about URL filter, please refer the microsoft document that could hope to help you: URL filters 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

As an update on our successful progress 🎆 , here's a screenshot. 

Since we're not using embedded scenarios, the red box shows the Filter for Record ID that was passed by URL but was not able to be passed to a PDF. 

So, we added an additional "Filter on all Pages" for the "Service Plan Name" field.

Since it's unique for records of this Service Plan record type, PBI Svc displays a single record to select.

When selected, this results in the same tables as the Filter by the Record ID passed by the URL. 

An extra step but relatively easy since it's just clicking a single filter box.

 

The next challenge is that another Service Plan record type is not unique, so we may need to create a unique key that will allow us to access fields in all of the dataset's tables that are required for this multi-page report...  Sounds like I may be posting another question 😊

Thanks to @v-yingjl and @GilbertQ for their coaching!

image.png

 

 

 

 

Awesome thanks for showing us how you solved it!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

GilbertQ
Super User
Super User

Hi there, as far as I am currently aware there is no way to respect the export to PDF.

With that being said there is the capability to copy a visual as an image

https://powerbi.microsoft.com/en-us/blog/announcing-copy-a-visual-as-an-image/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

@GilbertQ  thanks for the coaching - unfortunately, this is for a nonprofit reporting on activity and outcome metrics so each page of the report has several viz, but we could certainly do "screenshots" and paste them in to a doc.  

We're also exploring having another filter that could be entered based on the value in the passed record but we're trying to avoid re-entering info.

I would suggest having the filter that could be entered might be the way to get it working going forward.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors