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
BradRose
Helper I
Helper I

Power BI Paginated Reports Optional Parameters

Hi:

 

I have watched the cfinlan video on Power BI Paginated Reports Part 11 - More Parameters Tips and Trick.  We are going to use the URL function to send parameter from a Power BI Dashboard to the Paginated report.  What i need help with is there a way to make the paramater optional?  If the users does not make a selection for one of the parameter it is ignored or a all for that paramter is send to the Paginated Parameter.

 

Thanks

 

Brad

2 ACCEPTED SOLUTIONS
d_gosbell
Super User
Super User

The easiest way to make a parameter optional is to set a default value for the parameter

View solution in original post

It depends on why you have such a large list. If it's just a "select all" for a multi-select parameter then your other option is to either allow nulls or add a special value (something like "<All>") then you can put an expression into your query or an expression that builds your query to handle nulls or "<ALL>". The exact implementation depends on the query language you are using for your report, but the basic logic that is often used is

 

WHERE  @Parameter = "<All>"  OR MyColumn IN @Parameter

 

If you build your query using an expression you can even dynamically exclude the filter condition all together (but you loose some of the query designer tools if you switch your query over to using an expression instead of using a static query.)

View solution in original post

4 REPLIES 4
d_gosbell
Super User
Super User

The easiest way to make a parameter optional is to set a default value for the parameter

I tried the recomendation the issue is the default list is too long and will exceed the URL max lenth of 1027 characters.  Are there any other solutions?

 

Brad

Sorry I meant 2,083 characters

It depends on why you have such a large list. If it's just a "select all" for a multi-select parameter then your other option is to either allow nulls or add a special value (something like "<All>") then you can put an expression into your query or an expression that builds your query to handle nulls or "<ALL>". The exact implementation depends on the query language you are using for your report, but the basic logic that is often used is

 

WHERE  @Parameter = "<All>"  OR MyColumn IN @Parameter

 

If you build your query using an expression you can even dynamically exclude the filter condition all together (but you loose some of the query designer tools if you switch your query over to using an expression instead of using a static query.)

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.