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

Passing Parameters to a Paginated Report from Power BI Report

Hello

 

I have a report built in Power BI with some filters. When the user apply few filters and click print button, those filters selected on the Power BI report should be passed as a Parameters to Paginated Report through URL. Is it possible to do so? Can someone help me with this?

1 REPLY 1
d_gosbell
Super User
Super User

Yes this is possible. First you have to create a measure that will generate the URL, then you can link this to a button. When you create the measure you may need to think about issues such as what happens when a user picks multiple values and SSRS only expects 1 or what happens when a user does not pick a value from a slicer (maybe you want to set a default value)

 

In the following measure I am using SELECTEDVALUE to pull a category from a slicer and if nothing is selected or more than one category is selected the value will default to -1 and I'm getting the min and max dates from a between date slicer and formatting them appropriately for passing on a url.

Report URL = 
var _category = SELECTEDVALUE(Category[CategoryID],-1)
var _dateFrom = FORMAT(MIN('Date'[Date]),"yyyy-MM-dd")
var _dateTo = FORMAT(MAX('Date'[Date]), "yyyy-MM-dd")
return "http://localhost/ReportServer?/Test/ParameterTest&rs:Command=Render&pCategory=" & _category & "&pDateFrom=" & _dateFrom & "&pDateTo=" & _dateTo

Then in your button set the action type to "Web URL", click on the 3 vertical dots above the WebURL text box and  choose the conditional formatting option and then select the measure you just created. In the example above I'm opening a report on my local server called ParameterTest that is sitting in a folder called Test.

 

The above url format works for on-premise reports, if you are using Power BI Premium reports in the cloud you would use a url format like the one in this blog post https://powerbi.microsoft.com/en-us/blog/url-parameters-for-paginated-reports-are-now-available/

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.