Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PBDestiny
New Member

Need Measure to check If Item Containsstring then Return Yes or No

I have created this measure, but it is not working.  I'm trying to create a measure that looks at the Item Name field and checks if it contains part of the string "Keysight System".  If yes, then return yes else return no.  What am I doing wrong?

 

Keysight System =
  VAR IsKeysightSystem =
    IF(FILTER(Items, CONTAINSSTRING(Items[Item Name], "Keysight System")), "Yes", "No")
  Return IsKeysightSystem
1 REPLY 1
vicky_
Super User
Super User

If you just want to look at the item name, the SELECTEDVALUE() function works - 

Keysight System =
  VAR IsKeysightSystem =
    IF(CONTAINSSTRING(SELECTEDVALUE(Items[Item Name])"Keysight System"), "Yes", "No")
  Return IsKeysightSystem

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.