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
Aikeno
Frequent Visitor

Multicolumns filter

Hello everyone,

I have published a report with a matrice of this type (see below):

 

Project

Contact

Backup

Start

End

500

Benoit

Jean

 

 

600

Jean

Fabien

 

 

700

David

Fabien

 

 

800

Jean

Eude

 

 

 

The goal is to use a segment, filter or somethings that will allow me to filter all of the projects in which Jean is mentionned as contact or backup. 
Im not able to get this result. Do you know how i can achieve that ?
Thanks in advance for your help !

3 REPLIES 3
Timuran
Resolver I
Resolver I

@Aikeno 

The first thing is creating a new table with distinct values of Contact and Backup.
You can do as follow :

 

DistinctContactBackup = DISTINCT(UNION(DISTINCT(YOUR_TABLE[Contact]), DISTINCT(YOUR_TABLE[Backup])))

 

 

Then create a measure with the following :

 

 

Selected Contact Or Backup = SELECTEDVALUE('DistinctContactBackup'[Contact])

 

 

After, create a measure with the following (like what @Greg_Deckler told you):

 

 

 

Selector Contact Backup = IF( MAX(YOUR_TABLE[Contact]) = [Selected Contact Or Backup] || MAX(YOUR_TABLE[Backup]) = [Selected Contact Or Backup], 1, 0)

 

 

 

On your visual, add the measure and filter when the measure "Selector Contact Backup" = 1.

 

Add a segment with the values of your new table DistinctContactBackup.

 

Then you need to select the value you want.

 

Have a nice day.

Greg_Deckler
Super User
Super User

@Aikeno You need to use a Complex Selector: The Complex Selector - Microsoft Fabric Community. In your case something like:

Complex Selector Measure = 
  VAR __Target = "Jean"
  VAR __Contact = MAX( 'Table'[Contact] )
  VAR __Backup = MAX( 'Table'[Backup] )
  VAR __Result = IF ( __Contact = __Target || __Backup = __Target, 1, 0 )
RETURN
  __Result

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello,

 

Sorry for my late answer.

My need is to use a slicer to select the name as shown in your example.

I try to use your example but I think i don't get the good formatting for it.

 

Thanks for your help.

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.