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! It's time to submit your entry. Live now!
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! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 46 | |
| 30 | |
| 24 | |
| 23 |
| User | Count |
|---|---|
| 143 | |
| 111 | |
| 63 | |
| 38 | |
| 32 |