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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
anettpb
Helper I
Helper I

IF function with several OR condition

Dear Community,

 

I would like to create a column, where I can recalculate values, but only the chosen ones (17 pcs), and it would depends on the product name/description:

 

Net-net calc = IF('Call-offs'[Description]= "REDIGO A" OR "REDIGO B" OR "TEBU" OR "TEMPO 1" OR "TEMPO 2" OR"CELL" ), then 'Call-offs'[Net value] else 'Call-offs'[Net price]*-0,7)

 

Can anyone suggest a soltuion for that?

 

Thank you in advance!

 

 

6 REPLIES 6
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

you can do this by using IN:

 

Measure 5 = VAR _Selectedvalue = SELECTEDVALUE('Table'[Description])
return
IF(_Selectedvalue IN {"CELL","REDIGO A","REDIGO B","TEBU","TEMPO","TEMPO 2"},1,0)
 
i've just used true or false as the outcome but you can add sum fields or whatever you need
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Hi @DOLEARY85 

 

Thanks a lot for the idea. Unfortunately it is not working totally fine. I put in the { } my conditions ('Call-offs'[Net value], 'Call-offs'[Net price]*0,7. But it did not worked, every item has been multiplied with 0,7, those ones as well, which are listed before:

 

Net_net calc2 column= VAR _Selectedvalue = SELECTEDVALUE('Call-offs'[Description])
return
IF(_Selectedvalue IN {"A","B","C","D,"E","F","G", "H","I", "J","K", "L","M", "N","O", "P","Q"},'Call-offs'[Net value],'Call-offs'[Net value]*0.7)
 
Do you have any idea why it is not calculating well?

Hi @DOLEARY85 

 

Do you think that this is not working because of IF, so I should use e.g. SWITH instead of it?

 

I wouldn't have thought so. Do you have a copy of the PBIX i could look at?

Hello @DOLEARY85 

 

Unfortunately I think I cannot share the informations which are in this pbix, so I should not have to share it with you.

 

So you think that the used formula should work well? 

Yeah, i've tested it and it works for me.

 

There maybe something else in your dataset causing an issue. If you can share an anonymised version of the dataset i could test on that?

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors