Forum Discussion
MG06
3 years agoRegular Visitor
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 ...
- Anonymous3 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.
Anonymous
3 years agoNot applicable
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.
- MG063 years agoRegular Visitor
This worked perfectly!! Thank you š