cancel
Showing results for 
Search instead for 
Did you mean: 
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? Mark my post as a solution!

Proud to be a Super User!




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? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Dev Camp Session 30

Ted's Dev Camp - January 26, 2023

This session will provide guidance and teach campers the skills required to build Power BI reports that support multiple languages.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors