The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello community,
I am building a report in power bi report builder for List of project task
Few parameter from it are @ProjectStatus,@Projects, @ProjectModules, @ProjectTasks and all are multivalue parameter
When I select value from @ProjectStatus ie. 'Competed' @projects dropdown has no value so We cannot click on view report but i want to enable view report option and make projects module not mandatory.
Please give answer it will be very helpful
Solved! Go to Solution.
Hi, @AnujaDeshpande
If you insist on using more than one value for this parameter, you will have to select one of them when viewing the report, which will not contain null values.
If you want to view the report without selecting the null value, I think you have to uncheck multiple values for this parameter.
Report parameters in Power BI Report Builder - Power BI | Microsoft Learn
Your needs are conflicting, and you have to make trade-offs.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @AnujaDeshpande
If you want to make a parameter optional, you need to set it to accept null values, and you can't check more than one value.
Report parameters in Power BI Report Builder - Power BI | Microsoft Learn
When this happens, after we select parameter1, parameter2 will automatically update according to the selection of parameter1. When 7 is selected, parameter2 has no value and null is automatically selected.
Of course, if you want to keep multiple value parameters. Then the following two methods can be used:
1. Filter out items with empty parameter2 values in the query of Parameter1
2. Replace the item with a blank parameter2 value with a 0 or NULL or "" text value.
In both cases, you can keep a multi-value parameter and work with null values.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
We cannot use 'Allow Null Values' to multivalue parameter
Hi, @AnujaDeshpande
Please check the following two, and then follow the two methods I provided:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Thanks for the solution.
But I don't want Null to be displayed in dropdown it should automatically considered as blank so that we can click on view report.
Hi, @AnujaDeshpande
If you insist on using more than one value for this parameter, you will have to select one of them when viewing the report, which will not contain null values.
If you want to view the report without selecting the null value, I think you have to uncheck multiple values for this parameter.
Report parameters in Power BI Report Builder - Power BI | Microsoft Learn
Your needs are conflicting, and you have to make trade-offs.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @AnujaDeshpande
Modify the dataset query for `@Projects` to include a placeholder value (e.g., `"All"`) using `UNION ALL`
SELECT 'All' AS ProjectID, 'All Projects' AS ProjectName
UNION ALL
SELECT ProjectID, ProjectName FROM ProjectsTable
WHERE Status IN (@ProjectStatus)
Or try
If `@Projects` returns no values (e.g., when `@ProjectStatus = 'Completed'`), use an expression in the dataset filter:
=IIF(Parameters!Projects.Count = 0, Fields!ProjectID.Value, Parameters!Projects.Value)
Hello @nilendraFabric ,
Thank you for your reply.
When there is no value in project dropdown it will not allow us to view report I want to click on view report still if there are no values in project parameter hence I have added blank there.
Can you give any solution?