Forum Discussion
How do I use the slicer tool to pull data from multiple columns?
Hello,
I am trying to create an interactive dashboard where you can use the Slicer tool to select qualifying attributes of a product and it returns data connected to those products. One of the issues that I am having is that my data contains an "ALL" category instead of listing out each characteristic.
Example---
Fabric Content:
Cotton
Cotton
All Textiles
Linen
All Textiles
The problem that I am running into is that "Cotton" for example should be able to be selected and the data attached to "All Textiles" should also show up. In excel I solved for this with a rather long if,then formula and added each of the different textile types to the following columns then just pulled from all of that data.
Thank you in advance!
Hi Anonymous ,
We can create a new table with the category listed as the slicer.
Add the measure to the original table:
Measure 2 = IF(SELECTEDVALUE(Table4[Column1])="Cotton", CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="Cotton" || Table1[Fabric Content]="All Textiles"),'Table1'[ID]), IF(SELECTEDVALUE(Table4[Column1])="Linen", CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="Linen" || Table1[Fabric Content]="All Textiles"),'Table1'[ID]),CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="All Textiles"),'Table1'[ID])))Attached pbix here for your ease: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EZrXoN6KzTtNsJ1Ek-KAyC4Bfam_tzttMXkM1xq2m3IdvQ?e=0AKMIn
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Dina Ye
1 Reply
- v-diye-msft
Community Support
Hi Anonymous ,
We can create a new table with the category listed as the slicer.
Add the measure to the original table:
Measure 2 = IF(SELECTEDVALUE(Table4[Column1])="Cotton", CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="Cotton" || Table1[Fabric Content]="All Textiles"),'Table1'[ID]), IF(SELECTEDVALUE(Table4[Column1])="Linen", CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="Linen" || Table1[Fabric Content]="All Textiles"),'Table1'[ID]),CONCATENATEX(FILTER('Table1', Table1[Fabric Content]="All Textiles"),'Table1'[ID])))Attached pbix here for your ease: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EZrXoN6KzTtNsJ1Ek-KAyC4Bfam_tzttMXkM1xq2m3IdvQ?e=0AKMIn
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Dina Ye