Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
sa000
Frequent Visitor

How to filter on comma separated column

Hi.

 

Suppose I have sample data as this

ProductColor
Ared
Bred
Cblue
Dred,blue
Ered,blue
Fblue
Gblue

 

I would like the user to be able to filter by the color, red OR blue, not "red, blue". So if the user selects Red, A,B,D,E are filtered. Right now I'm not sure how to create a filter to do that. 


I see a similiar post which looks like it accomplishes what I want but is a bit hard to follow, https://community.fabric.microsoft.com/t5/Developer/Filter-on-comma-separated-multiselect-field/m-p/...

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

13 REPLIES 13
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, split the colour column by rows using the comma delimiter.  Click on Close and Apply.  Now create slicer/visuals.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sa000
Frequent Visitor

This is great! Can you outline your steps so I can reproduce in my usecase?

to know how to do this watch my video

https://1drv.ms/v/s!AiUZ0Ws7G26RjVdgrQApbiyC-hcE?e=Ncv57v

sa000
Frequent Visitor

Thank you! This almost works except I can't do multi selection without an error? Is there a way to accomplish this

pls try this code

Screenshot_1.png

Ahmedx
Super User
Super User

pls try this

Screenshot_2.png

Hi,

Can you help me with a measure to count the No. of red and No. of blue?

ProductColor
Ared
Bred
Cblue
Dred,blue
Ered,blue
Fblue
Gblue



In this case, the output expected is Red = 4, Blue = 5

Hi Ahmedx,

Thanks for your reply. 
I'm using your concept based on 451.pbix, where there is a mesure "flag" is used in "Table", because I encoutered as error while displaying all similar to 448.
Now, with this "Count 2" measure in 'DimColor', I'm getting the same error when all the values are loaded.

Can you resolve this?


Pls try

Screenshot_1.png

This works well for the scenario 

RedCount = CALCULATE( COUNTROWS('Table'), SEARCH("red", 'Table'[Color], 1, 0) > 0 )

Hi,

In Power Query, split the Color column into rows.  To your Table visual, drag Color to the row labels and write this measure

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for your inputs Ashish.

I'm using 451.pbix as the base to develop this.

Please try the method i suggested in my previuos message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors