Forum Discussion
Use column with multiple comma separated values to filter visuals
Hi everyone,
I have a column called "Applications" which contains multiple comma separated values. I need to filter my visuals by Applications.
When I select "Applications" and create a slicer I get this:
I need to filter by each individual application. For example, when SAP is selected, data from the following rows need to be seen:
SAP, Excel
SAP, Optik, Sharepoint, Excel
SAP, Sharepoint
How can I do this?
aarushirc14 Might be best to split out your applications in Power Query Editor using a ", " separater and then unpivot those columns. Otherwise it could get messy, you would have to get a list of distinct applications for your slicer. Then you would need to write a complex selector that grabs the selected items (use DISTINCT) in the slicer and then use ADDCOLUMNS to SEARCH the MAX value of your current Applications column and return 1 or 0 if it is found or not. Then, return the SUMX of that column. Set your filter pane to filter for this measure > 0.
7 Replies
- tamerj1Community Champion
aarushirc14
Then it is not as easy as it seems. It's bed time 🙂 I'll work on it tomorrow morning. One more question, do you have the unique list of applications or you need to create it using DAX calculated table?- aarushirc14New Member
Thanks! I don't have a unique list of applications but am able to produce a table for this easily as there's not many applications.
- tamerj1Community Champion
Hi aarushirc14
Is it only single selection slicer or you might select multiple items? - aarushirc14New Member
Hi! The user might select multiple items.
- Greg_DecklerCommunity Champion
aarushirc14 Might be best to split out your applications in Power Query Editor using a ", " separater and then unpivot those columns. Otherwise it could get messy, you would have to get a list of distinct applications for your slicer. Then you would need to write a complex selector that grabs the selected items (use DISTINCT) in the slicer and then use ADDCOLUMNS to SEARCH the MAX value of your current Applications column and return 1 or 0 if it is found or not. Then, return the SUMX of that column. Set your filter pane to filter for this measure > 0.
- aarushirc14New Member
Greg_Deckler I went with splitting out the Applications into rows and it worked. Thanks!