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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

IF CONTAIN A or B or C ( Multiple) Condition

Dear Team

 

Need your help again

Logics table below

LCL.png

 

Thanks, really appreciates any help

Syaiful Efendi

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Anonymous ,

 

Try this 

column =
IF (
    CONTAINSSTRING ( Table[Column], "kg" )
        || CONTAINSSTRING ( Table[Column], "bags" )
        || CONTAINSSTRING ( Table[Column], "kgs" )
        || CONTAINSSTRING ( Table[Column], "pallet" )
        || CONTAINSSTRING ( Table[Column], "packages" )
        || CONTAINSSTRING ( Table[Column], "case" )
        || CONTAINSSTRING ( Table[Column], "cbm" ),
    1,
    0
)

Note: CONTAINSSTRING is not case-sensitive.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

Hi @Anonymous ,

 

Try this 

column =
IF (
    CONTAINSSTRING ( Table[Column], "kg" )
        || CONTAINSSTRING ( Table[Column], "bags" )
        || CONTAINSSTRING ( Table[Column], "kgs" )
        || CONTAINSSTRING ( Table[Column], "pallet" )
        || CONTAINSSTRING ( Table[Column], "packages" )
        || CONTAINSSTRING ( Table[Column], "case" )
        || CONTAINSSTRING ( Table[Column], "cbm" ),
    1,
    0
)

Note: CONTAINSSTRING is not case-sensitive.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@Anonymous ,

You can also follow @danextian  approach. Or try below approach to get your result.

 

You can also try below approach:

Column = 

if(SEARCH("Kg",Table[Column],1,0),1,
if(SEARCH("Kgs",Table[Column],1,0),1,
if(SEARCH("bags",Table[Column],1,0),1,
if(SEARCH("pallet",Table[Column],1,0),1,
if(SEARCH("package",Table[Column],1,0),1,
if(SEARCH("case",Table[Column],1,0),1,
if(SEARCH("cbm",Table[Column],1,0),1,0))
 
Don't forget to give thumbs up 👍 and accept this as a solution if it helped you.
 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Thanks for ur help

@Anonymous , seems like a solution from @danextian has worked for you. Can you please mark the solution

Hi @Anonymous ,

 

If this solves your problem, please accept the post as solution.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.