Forum Discussion

MG06's avatar
MG06
Regular Visitor
3 years ago
Solved

Help with DAX for slicers - multiple selections and default value

Hello everyone! Can you help me? I’m new to PowerBI   I have a table ("MockupTest") that has names and the primary/secondary skills of those people, something like this:   MockupTest      ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi MG06 

    You can refer to the following measure

    Measure = var a=COUNTROWS(FILTER(VALUES('Table (2)'[Skills]),CONTAINSSTRING(SELECTEDVALUE('Table'[Primary Skills]),[Skills])))
    var b=COUNTROWS(FILTER(VALUES('Table (2)'[Skills]),CONTAINSSTRING(SELECTEDVALUE('Table'[Secondary Skills]),[Skills])))
    return IF(OR(a>0,b>0),1,0)

    Then put the measure to the visual filter

    Output

     

    Best Regards!

    Yolo Zhu

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