Forum Discussion
Looping for multivalued in power Bi report builder
Hi everyone,
Hope you're all doing well.
I’m working on a Power BI report builder and I have a query regarding handling multi-value selection. In my report, we have a slicer to select the Company Name. What I want to achieve is this:
- If the user selects multiple companies, display a different report with details related to that company.
How can I achieve this in Power BI? Is there a way to dynamically switch between different report views based on whether the selection is for one or multiple companies?
Looking forward to your suggestions!
Thanks in advance.
- Anonymous1 year ago
Hi Aartibhilare ,
Thanks for reaching out to Microsoft Fabric Forum Community,
To meet your requirements ,you can use the following approach:
You can create Multi-value parameters, Create Conditional Report Views and Control Visibility Dynamically.
Step 1: Create a Multi-Value Parameter
In your Power BI report, create a parameter (e.g., CompanyParameter) and check Allow multiple values. This will be linked to your slicer for selecting the company names.Step 2: Add a Dataset to Fetch the Selected Companies
- Create a dataset (e.g., SelectedCompanies) to capture the selected values of the parameter.
- Use an expression to convert the selected companies into a comma-separated list for visibility logic.
Example SQL :
SELECT CompanyName
FROM Companies
WHERE CompanyName IN (@CompanyParameter)
Step 3: Create Conditional Report Views- SingleView: For individual company selections.
- MultiView: For multiple company selections.
Step 4: Control Visibility Dynamically
- Set the visibility of the different report views based on the parameter.
For SingleView:
=IIF(Parameters!CompanyParameter.Count > 1, True, False)
For MultiView:
=IIF(Parameters!CompanyParameter.Count = 1, True, False)
Run the report and test the slicer selection,
If you need further assistance please reach out.
Hope this works for you,
Please consider giving a kudos and accept as solution to help others find it.Thank you.
11 Replies
- DivkLearner
Resolver I
Hello Aartibhilare ,
I think the action you are trying to do is not feasible using on Power BI Paginated report. I suggest that you can give them a link on the page to navigate to companies and in the sub report/or in another report show the Company's Detail.
Below Details are for reference.
You will require the following:
Best regards,
DivKlearner – A Bit Forward Daily
Join us as we explore and learn IT together.
Discover simplified IT learning on YouTube- Aartibhilare
Helper III
strange behaviour they should have the functionality and its basic of report
- DivkLearner
Resolver I
Hello Aartibhilare ,
Check for the following concepts: https://learn.microsoft.com/en-us/power-bi/paginated-reports/report-design/drillthrough-drilldown-subreports-nested-data-regions
If that solves your issue.
Best regards,
DivKlearner – A Bit Forward Daily
Join us as we explore and learn IT together.
Discover simplified IT learning on YouTube - AnonymousNot applicable
Hi Aartibhilare ,
Thanks for reaching out to Microsoft Fabric Forum Community,
To meet your requirements ,you can use the following approach:
You can create Multi-value parameters, Create Conditional Report Views and Control Visibility Dynamically.
Step 1: Create a Multi-Value Parameter
In your Power BI report, create a parameter (e.g., CompanyParameter) and check Allow multiple values. This will be linked to your slicer for selecting the company names.Step 2: Add a Dataset to Fetch the Selected Companies
- Create a dataset (e.g., SelectedCompanies) to capture the selected values of the parameter.
- Use an expression to convert the selected companies into a comma-separated list for visibility logic.
Example SQL :
SELECT CompanyName
FROM Companies
WHERE CompanyName IN (@CompanyParameter)
Step 3: Create Conditional Report Views- SingleView: For individual company selections.
- MultiView: For multiple company selections.
Step 4: Control Visibility Dynamically
- Set the visibility of the different report views based on the parameter.
For SingleView:
=IIF(Parameters!CompanyParameter.Count > 1, True, False)
For MultiView:
=IIF(Parameters!CompanyParameter.Count = 1, True, False)
Run the report and test the slicer selection,
If you need further assistance please reach out.
Hope this works for you,
Please consider giving a kudos and accept as solution to help others find it.Thank you.
- Aartibhilare
Helper III
Hi Anonymous
is there any document of llink which can i refer to for this?
- AnonymousNot applicable
Hi Aartibhilare ,
Thanks for the reply
Here are the supporting document links,
Report Parameters:
https://learn.microsoft.com/en-us/power-bi/paginated-reports/parameters/report-parameters-concepts-report-builder
https://learn.microsoft.com/en-us/power-bi/paginated-reports/parameters/add-change-delete-report-parameter-report-builder
Datasets, Conditional Report Views, Visibility:
https://learn.microsoft.com/en-us/power-bi/paginated-reports/report-design/add-dataset-filters-data-region-filters-and-group-filters
https://learn.microsoft.com/en-us/power-bi/paginated-reports/report-builder/connect-snowflake-databricks-power-query-online
Hope these help.
- Aartibhilare
Helper III
Hi v-karpurapud
do you have any idea on this?
- AnonymousNot applicable
Hi Aartibhilare ,
We haven’t heard back since our last response and wanted to check if your query has been resolved. If not, please feel free to reach out for further assistance. If it has been resolved, kindly mark the helpful reply as the solution to make it easier for others to find. A kudos would also be greatly appreciated!
Thank you.