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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Kamchokshi
New Member

DAX question

Hi

i am new to Power BI. 
I need a DAX formula to check if fields contain a particular word. 

if text contains the word remote then return "yes" otherwise "no"

 

example

123Remotexyz. return "Yes"

123Physicalxyz. return "No"

2 ACCEPTED SOLUTIONS
tackytechtom
Super User
Super User

Hi @Kamchokshi ,

 

How about this:

 

tackytechtom_0-1669317879807.png

 

LookupResult = 
IF ( ISERROR ( SEARCH ( "remote", 'Table'[Column] ) ), "No", "Yes" )

Let me know if this helped 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

v-xinruzhu-msft
Community Support
Community Support

Hi @Kamchokshi  ,

 

You can create a new column and input the following code:

Column =IF(CONTAINSSTRING('Table'[Column1],"remote"),"Yes","No")

 

Output:

vxinruzhumsft_0-1669790099395.png

 

 

 

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.

View solution in original post

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @Kamchokshi  ,

 

You can create a new column and input the following code:

Column =IF(CONTAINSSTRING('Table'[Column1],"remote"),"Yes","No")

 

Output:

vxinruzhumsft_0-1669790099395.png

 

 

 

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.

tackytechtom
Super User
Super User

Hi @Kamchokshi ,

 

How about this:

 

tackytechtom_0-1669317879807.png

 

LookupResult = 
IF ( ISERROR ( SEARCH ( "remote", 'Table'[Column] ) ), "No", "Yes" )

Let me know if this helped 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors