Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filtering Mixed Groups

I've got data roughly as below:   Part Number System Pressure Size A1929 Horizontal 1000bar 5mm A2910 Horizontal + Vertical 1000bar 7mm A2819 Horizontal 1500bar 5mm+7mm A...
  • v-alq-msft's avatar
    v-alq-msft
    6 years ago

    Hi, Anonymous 

    You can create three calculated table as follows.

     

    PressureSlicer = DISTINCT('Table'[Pressure])
    SizeSlicer = DISTINCT('Table'[Size])
    SystemSlicer = DISTINCT('Table'[System])

     

     

    Then you may create three measures as follows.

     

    ContainPressure = 
    IF (
        SUMX (
            FILTERS ( 'PressureSlicer'[Pressure] ),
            IF (
                CONTAINSSTRING ( SELECTEDVALUE ( 'Table'[Pressure] ), [Pressure] ),
                1,
                BLANK ()
            )
        ) <> 0,
        1,
        0
    )
    
    ContainSize = 
    IF(
        SUMX(
            FILTERS(
                SizeSlicer[Size]
            ),
            IF(
                CONTAINSSTRING(SELECTEDVALUE('Table'[Size]),[Size]),
                1,
                BLANK()
            )
        )<>0,
        1,
        0
        
    )
    
    ContainsSystem = 
    IF(
        SUMX(
            FILTERS(
                SystemSlicer[System]),
                IF(
                    CONTAINSSTRING(SELECTEDVALUE('Table'[System]),[System]),
                    1,
                    BLANK()
                )
        )<>0,
        1,
        0
        
    )

     

     

    Finally, you may put these measures in visual level filters and configure as follows.

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.