Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I want to filter based on selection in the slicer (multiple selection should work). Right now the measure is working only for a single selection, if I select multiple options then it doesn't filter.
I'm using Service_slicer to filter Service_column.
Service_column:
Service_slicer:
Measure:
Result = 
VAR SelectedValues = VALUES(Services_slicer[Services])
VAR Delimiter = ","
RETURN
    IF (
        COUNTROWS(
            FILTER (
                PBI_restaurants_in_India,
                CONTAINSSTRING(
                    SUBSTITUTE(PBI_restaurants_in_India[Services], Delimiter, "|"),
                    SELECTEDVALUE(Services_slicer[Services])
                )
            )
        ) > 0,
        1,
        0
    )
Filter Pane:
Solved! Go to Solution.
 
					
				
		
Hi @rohitkushwaha ,
First create a mid table in powerquery:
And then please create a measure like:
Result2 = 
VAR __selected_values = ALLSELECTED('Services_slicer'[Services])
VAR __cur_services = VALUES('PBI_restaurants_in_India'[Services])
VAR __selected_values_count = COUNTROWS(__selected_values)
VAR __services = CALCULATETABLE(VALUES('Services_slicer_2'[Services]),TREATAS(__selected_values,'Services_slicer_2'[Services2]))
VAR __services_count = CALCULATE(COUNTROWS('Services_slicer_2'),TREATAS(__selected_values,'Services_slicer_2'[Services2]),TREATAS(__cur_services,'Services_slicer_2'[Services]))
VAR __filter = IF(SELECTEDVALUE('PBI_restaurants_in_India'[Services]) IN __services && __services_count = __selected_values_count, 1)
RETURN
__filterAnd apply it to the visuals filter.
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi,
In the Power Query Editor, split the contents of that column into rows using the comma delimiter.
 
					
				
		
Hi @rohitkushwaha ,
First create a mid table in powerquery:
And then please create a measure like:
Result2 = 
VAR __selected_values = ALLSELECTED('Services_slicer'[Services])
VAR __cur_services = VALUES('PBI_restaurants_in_India'[Services])
VAR __selected_values_count = COUNTROWS(__selected_values)
VAR __services = CALCULATETABLE(VALUES('Services_slicer_2'[Services]),TREATAS(__selected_values,'Services_slicer_2'[Services2]))
VAR __services_count = CALCULATE(COUNTROWS('Services_slicer_2'),TREATAS(__selected_values,'Services_slicer_2'[Services2]),TREATAS(__cur_services,'Services_slicer_2'[Services]))
VAR __filter = IF(SELECTEDVALUE('PBI_restaurants_in_India'[Services]) IN __services && __services_count = __selected_values_count, 1)
RETURN
__filterAnd apply it to the visuals filter.
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |