Forum Discussion
How to filter on comma separated column
Hi.
Suppose I have sample data as this
| Product | Color |
| A | red |
| B | red |
| C | blue |
| D | red,blue |
| E | red,blue |
| F | blue |
| G | blue |
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/1631990#M27556
pls try this
13 Replies
- Ahmedx
Super User
- ParameswaranPNew Member
Hi,
Can you help me with a measure to count the No. of red and No. of blue?Product Color A red B red C blue D red,blue E red,blue F blue G blue
In this case, the output expected is Red = 4, Blue = 5- Ashish_Mathur
Super User
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.
- sa000Frequent Visitor
This is great! Can you outline your steps so I can reproduce in my usecase?
- Ashish_Mathur
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.