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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SantoshKumar
Microsoft Employee
Microsoft Employee

Created two slicers using three column values

Hi All,
I have below three columns in my table and i have two create two slicers as per below requirement.
1. Slicer one value will have values from ColumnA

2. Slicer two will have values from ColumnB and ColumnC

but when i select values from Slicer1 it should show only some values as mentioned below.
a) when i select value as "Super" -> it should display values in Slicer2 only "CU,MN,FE"
b) when i select value as "Big" -> it should display values in Slicer2 only "ZN,TE,KL"
c) when i select value as "Work" -> it should display values in Slicer2 only "all ColumnC values" 

Note: CoulmA and ColumnB are calculated columns.

ColumnAColumnBColumnC
SuperCU2021.07 D
BigMN2021.08 A
WorkFE2021.08 B
 Zn2021.08 C
 TE2021.08 D
 KL2021.09 B
  2021.09 C
  2021.10 B
  2021.10 C
  2022.11 B
  2022.11 C
  2022.12 B
  2022.01 B
  2022.01 C

 

Regards

Santosh 

1 ACCEPTED SOLUTION
SantoshKumar
Microsoft Employee
Microsoft Employee

Due to Data integrity, i am providing the result with sample values as mentioned in my post.

 

Code sample here:
Slicer1 =
IF(CONTAINSSTRING(Table1[columnxyz],"ABC")
|| CONTAINSSTRING(Table1[columnxyz],"DEF"),"Super",
IF(CONTAINSSTRING(Table1[columnxyz],"12AA"),"Big",
IF(CONTAINSSTRING(Table1[columnxyz],"34BB"),"Work","")))

 

Slicer2 =
Switch(True(),
CONTAINSSTRING(Table1[columnxyz],"ABC")
|| CONTAINSSTRING(Table1[columnxyz],"DEF"),Table1[ColumnB],
CONTAINSSTRING(Table1[columnxyz],"12AA"),Table1[ColumnB],
CONTAINSSTRING(Table1[columnxyz],"34BB"),Table1[ColumnC])

View solution in original post

7 REPLIES 7
SantoshKumar
Microsoft Employee
Microsoft Employee

Due to Data integrity, i am providing the result with sample values as mentioned in my post.

 

Code sample here:
Slicer1 =
IF(CONTAINSSTRING(Table1[columnxyz],"ABC")
|| CONTAINSSTRING(Table1[columnxyz],"DEF"),"Super",
IF(CONTAINSSTRING(Table1[columnxyz],"12AA"),"Big",
IF(CONTAINSSTRING(Table1[columnxyz],"34BB"),"Work","")))

 

Slicer2 =
Switch(True(),
CONTAINSSTRING(Table1[columnxyz],"ABC")
|| CONTAINSSTRING(Table1[columnxyz],"DEF"),Table1[ColumnB],
CONTAINSSTRING(Table1[columnxyz],"12AA"),Table1[ColumnB],
CONTAINSSTRING(Table1[columnxyz],"34BB"),Table1[ColumnC])

Mahesh0016
Super User
Super User

Hello @SantoshKumar ,
Please can you share your exepacted result for more understanding.

@Mahesh0016 Here are the examle:
Option1 is first selection , Option2 is second selection and Option3 is third selection. Let me know whether it will works?

 

SantoshKumar_0-1671170171319.png

 

these are three column in one table or different table.

Same Table

Hello @SantoshKumar ,

in this table you more data also or ....

@Mahesh0016  Yes, I have around 15-20 columns in that table along with these three columns in that table.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors