Forum Discussion

m2r's avatar
m2r
New Member
2 years ago
Solved

Slicer with multiple select as contains in multiple values column where all selected values

Hello,   Here is what I am trying to do, below is the table I have:   Product Characteristics A 1 B 1;2 C 1;2;3 D 3 E 3;2 F 1;3 G 4 ...
  • Daniel29195's avatar
    2 years ago

    m2r 

    output : 

     

     

     

    steps 

    step1 

    go to power query -->  select table -->  select column characteristics -->  select split by columns under transform --> 

     

     

     

     

    table result : 

     

     

     

    now write the following measure : 

    measure = 
    var ctr =  COUNTROWS(ALLSELECTED('Table'[Characteristics]))
    
    var dss = 
    FILTER(
    ADDCOLUMNS(
        VALUES('Table'[Product]),
        "@c", 
        CALCULATE(
            DISTINCTCOUNT('Table'[Characteristics]),
            ALLSELECTED('Table'[Characteristics])
        )
    ),
    [@c] = ctr
    )
    
    
    
    
    return CALCULATE(COUNT('Table'[Characteristics]), KEEPFILTERS(dss))

     

    drag product column and the measure to the visual : 

     

     

     

     

     

    let me know if this works for you .

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠