Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello - Instead of IN I want to add the condition contains in my measure. What condition can I use to make this work?
RETURN SWITCH ( TRUE(),
__PO IN { "MMS-NYC" } && __Reason = "MMS", "Missing"
Solved! Go to Solution.
I prefer CONTAINSSTRING in this situation since we don't care about the position of the substring.
To check if the variable __PO contains the string "MMS-NYC", you can write
CONTAINSSTRING ( __PO, "MMS-NYC" )
You can use FIND function - https://learn.microsoft.com/en-us/dax/find-function-dax
Note - FIND is case-sensitive. You can use SEARCH if you are looking for case-insensitive scenario - https://learn.microsoft.com/en-us/dax/search-function-dax
I prefer CONTAINSSTRING in this situation since we don't care about the position of the substring.
To check if the variable __PO contains the string "MMS-NYC", you can write
CONTAINSSTRING ( __PO, "MMS-NYC" )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 35 | |
| 34 | |
| 27 |
| User | Count |
|---|---|
| 137 | |
| 97 | |
| 74 | |
| 66 | |
| 65 |