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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
AllanBerces
Post Prodigy
Post Prodigy

Contain Word

Hi can someone help me on my calculated column, If the column Name contain SCREW then 0 if

not blank

AllanBerces_0-1780120764242.png

NameResult
SILICON RTV SEALANT 75 GM TUBE 
BLT HEX,A1082-UNS S32760,UNC,50MM,M16 
PNL FLR BAR MET 33/100 1219MM 905MM 
SCREW HEX HD,SS316,METRIC,20mm,6mm0
SILICON RTV SEALANT 75 GM TUBE 
BLT HEX,A1082-UNS S32760,UNC,50MM,M16 
OGLAEND SCREW,1371326,SS,M10X25,100/PK0
BOLT,U,OGLAEND,1302409,M10,2in,62mm 
SCREW HEX HD,SS316,METRIC,20mm,6mm0
TRAY,CABLE,1371751,OGLAEND 
TIE,CBL,MULTI-LOK,150x7mm,AE611,BAND-IT 
SCREW HEX HD,SS316,METRIC,20mm,6mm0
SCREW,PAN HEAD,OGLAEND,200/PACK,1372157,M6X200
SFTP, SCREW STL,25mm,100
PAN HEAD SCREW,OGLAEND,200/PACK,1372157,M6X200
SCREW HEX HD,SS316,METRIC,20mm,6mm0
1 ACCEPTED SOLUTION
pallavi_r
Super User
Super User

Hi @AllanBerces 

 

Please find the code below to get the expected output.

Corrected Expected Result =
IF(
    CONTAINSSTRING('Inventory Data'[Name], "SCREW"),
    0,
    BLANK()
)
 
pallavi_r_0-1780124179375.png

 

If this post helps, please accept this as a solution. Appreciate your kudos.

Thanks,
Pallavi

 

 

View solution in original post

6 REPLIES 6
pallavi_r
Super User
Super User

Hi @AllanBerces 

 

Please find the code below to get the expected output.

Corrected Expected Result =
IF(
    CONTAINSSTRING('Inventory Data'[Name], "SCREW"),
    0,
    BLANK()
)
 
pallavi_r_0-1780124179375.png

 

If this post helps, please accept this as a solution. Appreciate your kudos.

Thanks,
Pallavi

 

 

Hi @pallavi_r if i want to add other word aside from SCREW, how does dax look like. let say SCREW and SILICON

Hi,

Do you want to see 1 if both those words are available in the cell or do you want a 1 if anyone of those is available?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur @pallavi_r anyone of those word is avialable. thank you

Try this

=IF(OR(CONTAINSSTRING('Inventory Data'[Name], "SCREW"),CONTAINSSTRING('Inventory Data'[Name], "SILICON)),0,BLANK())

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @pallavi_r thank you very much

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.