Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Display Values that share same values across three different columns

Hello, I Have a Table that is similar to the one below: Product ID Product Type Product Location Product Color A WIDGET NY BLUE B WIDGET CA RED C WIDGET NYC BLUE D SERVE...
  • v-frfei-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    I have created a sample for your reference. Please check the following steps as below.

    1. Create a calculated table and make it as slicer.

    Slicer = DISTINCT(Query1[Product ID])

    2. New a measure and make the table viusal filtered by it.

     

    Measure =
    VAR pro =
        SELECTEDVALUE ( Slicer[Product ID] )
    VAR color =
        CALCULATE (
            MAX ( Query1[Product Color] ),
            FILTER ( ALL ( Query1 ), Query1[Product ID] = pro )
        )
    VAR loc =
        CALCULATE (
            MAX ( Query1[Product Location] ),
            FILTER ( ALL ( Query1 ), Query1[Product ID] = pro )
        )
    VAR ty =
        CALCULATE (
            MAX ( Query1[Product Type] ),
            FILTER ( ALL ( Query1 ), Query1[Product ID] = pro )
        )
    RETURN
        IF (
            MAX ( Query1[Product Color] ) = color
                && MAX ( Query1[Product Location] ) = loc
                && MAX ( Query1[Product Type] ) = ty,
            1,
            0
        )
    

     

     Pbix as attached.