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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ashtyn
New Member

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! 

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @ashtyn ,

 

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])))

4.png

Attached pbix here for your ease: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EZrXoN6KzTtNsJ1Ek-KAyC...

 

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

1 REPLY 1
v-diye-msft
Community Support
Community Support

Hi @ashtyn ,

 

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])))

4.png

Attached pbix here for your ease: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EZrXoN6KzTtNsJ1Ek-KAyC...

 

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.