Multi Criteria, IF and contains


The first criteria applies a surcharge only to products in 2019, for all product lines except any Product that is “KIC”, product code could look like KIC 1005.

Need to action both criteria’s if true? Any idea would be appreciated.

Total Costs + 25% = if(OR(CALCULATE([Total Costs],Dates[Year]>=“2019”),NOT CONTAINS(Products,Products[SKU - Vendor],“KIC”)),[Total Costs]+ ([Total Costs]*0.25),[Total Costs])

Not too sure if the full question made it into the thread here.

But anyway, have you explored using the SWITCH function instead?

Its much cleaner when you have multiple different pieces of logic with IF.


Thank you SWITCH did not work for me in this instance, maybe using wrong.

Managed to get what I want by doing this

Total Costs + 6% = if(CALCULATE([Total Costs],Dates[Year]>=“2019”,NOT(CONTAINSSTRING(Products[SKU],“KIC”))),[Total Costs]+ ([Total Costs]*0.06),[Total Costs])

What about if you use Search?

Contain KIC = 

IFERROR(                                --Need to wrap in IFERROR or wont work
    SEARCH("KIC", VALUES('Table'[Sku]))
    ,"Not KIC"                          --probably want blank() here, but showing how it it work

From there you can use measure branching for your other requirements.

Thank you for your alternative way to accomplish this.