Forum Discussion
Slicer for Multiple-Choice Values
Hi,
I have a fact table containing values from a website form where multiple choices are possible.
My goal was to create a dimension table and use it as a slicer. However, it only works with exact matches and not with contains. This means that if I select "1" in the slicer, only the exact "1" values from the fact-table are filtered, while entries like "1,2" or "1,3" are excluded.
If anyone has an idea on how to solve this issue, it would be much appreciated! 🙂
Hi cn4422 , Thank you for reaching out to the Microsoft Community Forum.
You don’t need to split the main fact table directly. Instead, create a reference table from it in Power Query, keep only the record ID and the multi-choice column. Then split that column by commas into rows, so each choice becomes its own row. This new table acts as a bridge between your fact table and the dimension table (link ID -> fact and choice value -> dimension). Now your slicer from the dimension table will correctly filter all rows that contain the selected value, even when it’s part of a comma-separated list.
14 Replies
- ryan_mayuSuper User
here is a workaround for you,
create a duplicated column for fact table and split by comma to rows.
then create a measure and add that measure to visual filter and set to 1.
Pls see the attahment below
- lbendlinSuper User
Change your commas to pipe. Then use PATHCONTAINS in your measure that you use as the visual filter.
- cn4422Helper V
Hi lbendlin,
thanks for your reply!
I tried the approach with "PATHCONTAINS" but I didn't succed.
I tried two measures
Product_Selector =
VAR SelectedID = SELECTEDVALUE('dimProduktauswahl'[Produktauswahl])
RETURN
IF(
PATHCONTAINS('lead'[Produktauswahl_Pipe], SelectedID & ""),
1,
0
)and
Product_Selector =
VAR SelectedID =
SELECTEDVALUE('dimProduktauswahl'[Produktauswahl])
RETURN
IF(
PATHCONTAINS(
PATH('lead'[pre_product_selection_pipe]),
SelectedID & ""
),
1,
0
)but couldn't get it to work since with "PATH" I could only select measures and not my other tables.
- Ashish_MathurSuper User
Hi,
Create the dim table by removing duplicates from the multiple choice answer column.
- RufydaSuper User
Split the multi-choice column into rows in Power Query:
Duplicate the column.
Split by delimiter (comma) → Split into rows.
Use this new column in your slicer.
Use PATHCONTAINS() with a measure if you cannot split the column.
If this helps, please mark as Accepted Solution and drop a "Kudos"- v-hashadapuCommunity Support
Hi cn4422 , Thank you for reaching out to the Microsoft Community Forum.
You don’t need to split the main fact table directly. Instead, create a reference table from it in Power Query, keep only the record ID and the multi-choice column. Then split that column by commas into rows, so each choice becomes its own row. This new table acts as a bridge between your fact table and the dimension table (link ID -> fact and choice value -> dimension). Now your slicer from the dimension table will correctly filter all rows that contain the selected value, even when it’s part of a comma-separated list.
- v-hashadapuCommunity Support
Hi cn4422 , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
- cn4422Helper V
Hi v-hashadapu ,
thanks for your message.
I'll hopefully be testing the suggested approaches tomorrow and will then gladly post an update on how it went. 😊
- v-hashadapuCommunity Support
Hi cn4422 , Thanks for the update. Please do share the results once you have had the chance to test it.