Forum Discussion
Parameter question in Power BI report builder.
Hi
I have a dataset that is created in power bi report builder using a power bi dataset as the data source.
I have added a parameter to the power bi report builder file.
I have tested the parameter and it works fine. Here is an example:
The power bi report builder dataset looks like this:
| User | Score |
| A | 77 |
| B | 85 |
I can create my parameter called user and use it to filter the dataset so if when I click run and give a value of A when prompted I will get the following table
| User | Score |
| A | 77 |
This is fine.
I want to alter the behaviour so that when prompted for a parameter if I leave that blank it will not apply any filter to the table.
So at the moment if I enter no value I either get an error (which would say blank values are not allowed if I don't enable that when creating the parameter, or it will filter the table to where User = "", which will return a blank table if blank values are enabled for the parameter).
Essentially I want to create many parameters for my report, some of which will be used, others might not be. However at the moment, I have to supply a value for each of the parameters I select when I run the report. For example in my example a user might want to select the score for user A, alternatively someone might want to see all scores above 80. So I set another parameter on score, but when the second user goes to run the report, they will have to enter not only the score but also the user, which is a problem as they don't want to filter on the user only on the score?
So in a perfect scenario, they can just select one, and it will filter on that and just not provide a value for the other one and it will take everything by default.
The behaviour I want is like the power bi desktop with the follow setup, with no interaction between the slicers themselves but they both filter the table.
i.e if a someone selects user A on the filter, they don't also need to use the other slicer to get a value in the table, power bi just takes everything unless it is told otherwise. I want the same behaviour on my paginated report parameters, I want them to behave the exact same way as the slicers in this scenario. Cross filtering is not needed though.
It would also be nice if I could pass these parameters to the url.
So for example if someone wants to see User A only then they can use:
base-url for the paginated report + ?rp:User=A
Or if someone wants to see someone with a score of 85 they can use:
base-url for the paginated report + ?rp:Score=85
If I try and do that for the current way I have it set, paginated reports will give an error because I need to supply a value for both parameters.
So in summary I want to be able to set up many parameters, but only have them filter the dataset if a value is provided, if no value is provided, it does no additional filtering.
1 Reply
- AnonymousNot applicable
Hi tomi5
The parameters in paginated reports work differently from the slicers in Power BI reports. If you don't want to filter a paramter, which means you hope to select all available values for this parameter, you need to check the property Allow multiple values. When this option is selected, check boxes are added to the list of available values in a parameter drop-down list. The top of the list includes a check box for Select All. Users can check "Select All" to select all values for this paramter easily.
Documentation: Report parameters in Power BI Report Builder - Power BI | Microsoft Learn
Hope this will be helpful.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!