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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
myou
Helper II
Helper II

How to make a slicer to filter for multiple columns

I have this table

 

IDMember1Member2Score
1JohnJack10
2JackJohn20
3JohnJohn30
4JackJack40
5SaraMaya50
6JackMia60
7MayaJohn70

 

I want to have a slicer that when i select two values for example 

Capture.PNG

It will show me these rows when Jack and John are working together

IDMember1Member2Score
1JohnJack10
2JackJohn20

 

 

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @myou,

 

Based on my test, we can take the following steps to meet your requirement.

 

1. Create two calculated columns.

 

con = CONCATENATE(Table1[Member1],Table1[Member2])
con2 = CONCATENATE(Table1[Member2],Table1[Member1])

2. Create two measures as below.

 

Conca = CALCULATE(CONCATENATEX(VALUES(Table1[Member1]),Table1[Member1]),ALLSELECTED(Table1))
Measure = IF(MAX(Table1[con]) = [Conca] || MAX(Table1[con2])= [Conca],1,0)

3. Then we can create the visual and filter the visual based on the Measure.

 

1.png

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/6k18se3dh2ejjzu/How%20to%20make%20a%20slicer%20to%202.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @myou,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @myou,

 

Based on my test, we can take the following steps to meet your requirement.

 

1. Create two calculated columns.

 

con = CONCATENATE(Table1[Member1],Table1[Member2])
con2 = CONCATENATE(Table1[Member2],Table1[Member1])

2. Create two measures as below.

 

Conca = CALCULATE(CONCATENATEX(VALUES(Table1[Member1]),Table1[Member1]),ALLSELECTED(Table1))
Measure = IF(MAX(Table1[con]) = [Conca] || MAX(Table1[con2])= [Conca],1,0)

3. Then we can create the visual and filter the visual based on the Measure.

 

1.png

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/6k18se3dh2ejjzu/How%20to%20make%20a%20slicer%20to%202.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @myou,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft,

 

What does MAX do in the IF here?  I was trying to learn from this example and replaced MAX with MIN as I thought it was just trying to determine if the comparison was TRUE and got the same results EXCEPT for the grand total in which I got a 0.  Can you help me understand why?

 

Thanks again for a great solution.  

 

Dawn

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.