March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a paginated report with different parameters, one being optional parameter. I have added this paginated report into Desktop report and mapped the parameters with PowerBI field.
It is working as expected when i select any value from slicer, it is getting passed to parameter in paginated report.
When deselect all from one of the slicer which is mapped to optional parameter in paginated report, it is selecting all the values and passing to paramter and applying to where clause.
Is there anyway to build optional slicers in Power BI?
Thank you for the quick response. Our datasource is IBM DB2 and we are bound to use only Direct Query method due to business reasons. Does the suggested solution above still works?
Hi @SowjanyaB
Yes, you can simulate optional slicers in Power BI by adding a specific option to represent "no selection." Here's how:
Create a Parameter Table with an Additional "(None)" Option:
ParameterTable =
ADDCOLUMNS(
DISTINCT('YourTable'[ParameterField]),
"ParameterValue", 'YourTable'[ParameterField]
)
UNION(
ROW("ParameterField", "(None)", "ParameterValue", BLANK()),
VALUES('YourTable'[ParameterField])
)
Use the New Table in Your Slicer:
Modify Your Measures to Handle the "(None)" Selection:
SelectedParameter =
IF(
SELECTEDVALUE(ParameterTable[ParameterField]) = "(None)",
BLANK(), // Treat as optional
SELECTEDVALUE(ParameterTable[ParameterField])
)
Pass the Selected Parameter to the Paginated Report:
By adding a "(None)" option, users can choose it to indicate that the parameter should not filter data, effectively making it optional.
Note: Replace 'YourTable' and [ParameterField] with your actual table and field names.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn|Twitter|Blog |YouTube
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |