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
Solved! Go to Solution.
Hi @Anonymous,
You can use DAX to achieve it with the help of function FIND (case-sensitive)or SEARCH (case-insensitive)as below screenshot:
GoodorBrokenAgent = if(SEARCH("ESX",'Server&VDI'[Device Name],1,0)>0||SEARCH("Appliance",'Server&VDI'[Device Name],1,0)>0 ||SEARCH("Solaris",'Server&VDI'[Operating system],1,0)>0||SEARCH("vSphere",'Server&VDI'[Operating system],1,0)>0 ||SEARCH("vSphere",'Server&VDI'[Operating system],1,0)>0,"Broken Agent","Good Agent") |
Best Regards
Rena
Hi @Anonymous,
You can use DAX to achieve it with the help of function FIND (case-sensitive)or SEARCH (case-insensitive)as below screenshot:
GoodorBrokenAgent = if(SEARCH("ESX",'Server&VDI'[Device Name],1,0)>0||SEARCH("Appliance",'Server&VDI'[Device Name],1,0)>0 ||SEARCH("Solaris",'Server&VDI'[Operating system],1,0)>0||SEARCH("vSphere",'Server&VDI'[Operating system],1,0)>0 ||SEARCH("vSphere",'Server&VDI'[Operating system],1,0)>0,"Broken Agent","Good Agent") |
Best Regards
Rena
As per doc. Contains means all values
https://docs.microsoft.com/en-us/dax/contains-function-dax
You have use search in dax or https://docs.microsoft.com/en-us/powerquery-m/list-containsany in M
This seems eerily similar to another question that was asked on this site a few days ago. In answer to your current question I believe the answer is "No, you cannot use CONTAINS to do what you want to do". The reason is that CONTAINS searches for the specified text within the entire value of the column, it does not do partial matches in values of columns.
Thanks Greg! What function should I use instead?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |