Forum Discussion

Aliceeeee's avatar
Aliceeeee
Frequent Visitor
8 months ago
Solved

Make two disconnected slicers filter a matrix

I’m trying to make an Availability matrix respond to two slicers that come from the same “Skills” fact table but different attributes (and keep relationships single‑direction). Visual setup Matrix...
  • v-prasare's avatar
    v-prasare
    8 months ago

    Hi Aliceeeee,

    Please convert each slicer selection into its corresponding dimension key set by using TREATAS, making sure it produces a single column table that matches 'Dim People'[FullNameKey]. If a slicer table contains multiple columns, reduce it to only the required key column.

     Next, apply INTERSECT() across these key sets to retain only the entities that are common to all slicer selections, ensuring true AND logic. Finally, apply the intersected key set back to the dimension using a final TREATAS so that measures are filtered correctly. This approach preserves single direction relationships, keeps slicers independent, allows other slicers (such as Expertise) to behave as expected, and ensures accurate, predictable results.

     

    Please try below DAX measures:

    CertPeopleKeys := VAR CertKeysFromSlicer =
        CALCULATETABLE (
            VALUES ( 'Dim People'[FullNameKey] ),
            TREATAS ( VALUES ( 'Certifications'[PersonKey] ), 'Dim People'[FullNameKey] )
        )
    RETURN
        IF ( ISFILTERED ( 'Certifications'[PersonKey] ), CertKeysFromSlicer, VALUES ( 'Dim People'[FullNameKey] ) )
    
    
    
    
    
    ScreenPeopleKeys := VAR ScreenKeysFromSlicer =
        CALCULATETABLE (
            VALUES ( 'Dim People'[FullNameKey] ),
            TREATAS ( VALUES ( 'Screening'[PersonKey] ), 'Dim People'[FullNameKey] )
        )
    RETURN
        IF ( ISFILTERED ( 'Screening'[PersonKey] ), ScreenKeysFromSlicer, VALUES ( 'Dim People'[FullNameKey] ) )

     

    If above solution does not works as cengizhanarslan suggested please share sample pbix file so that we will reproduce from our end.

     

     

     

     

    Thanks,

    Prashanth