Forum Discussion

Aikeno's avatar
Aikeno
Helper I
3 years ago

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

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    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
    • Aikeno's avatar
      Aikeno
      Helper I

      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.

  • 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.