In this post, we will learn how to filter dataset based on another dataset result in Power BI Report Builder.
In some cases, you may need to show all rows in a specific dataset based on selected sections coming dynamically from DB. In this case, you have to use Internal Paramter by doing the following:
Steps
- Create the first dataset - the main one which will use in filtration, for example customer_list
- Create the internal parameter, for example "AllowedCustomer".
- From left side click on "Available Values", and select "Get values from a query".
- Then select the dataset from first step and fill value / label field.
- From Left side click on "Default Values", , and select "Get values from a query".
- Then select the dataset from first step and fill value field.
- Create the socend dataset that need to filtered by first one, add the parameter in query, for example where customer_number in (@AllowedCustomer)
- From left side click on "Parameters", and add the parameter to use in query and select the internal parameter from socend step.
- Now test the project, you will find the data is filtered dynamically based on the first dataset result.
See also Install and Configure Power BI Report Server Step by Step