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
Anonymous
Not applicable

Multiple IF Conditions or OR Function or IN Function

Fabricmates,

 

I am trying to create a new column which has to drive value after validating 2 different column conditions.

 

Below is three attributes (Column)

 

Count         Score     Dollar (Mn) 

10 CT            70               10

18 CT            92               11

28 CT            80                9

40 CT            79                8

 

Criteria: I have to check conditions in both [Count] and [Score]. For [Count] 10 CT, 18 CT, 28 CT and Score >=80; New Dollar to be arrived with formula (80 - [score])*[Dollar (Mn)] and if [Count] is 40 CT then Score checked with 75 (>=75) then New Dollar to be (75 - [Score])*[Dollar (Mn)].

 

I am able to do with single condition i.e. only with Score but struggling to get result with multiple conditions. I tried to get result by using OR or IN function but didn't get success.

 

Any support will be appreciated!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try to create a new column with below dax formula:

New Dollar =
VAR cur_count = [Count]
VAR cur_score = [Score]
VAR cur_dollar = [Dollar(Mn)]
VAR tmp = { "10 CT", "18 CT", "28 CT" }
VAR _r1 = ( 80 - cur_score ) * cur_dollar
VAR _r2 = ( 75 - cur_score ) * cur_dollar
RETURN
    SWITCH (
        TRUE (),
        cur_count
            IN tmp
                && cur_score >= 80, _r1,
        cur_count = "40 CT"
            && cur_score >= 75, _r2
    )

vbinbinyumsft_0-1704941580588.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please try to create a new column with below dax formula:

New Dollar =
VAR cur_count = [Count]
VAR cur_score = [Score]
VAR cur_dollar = [Dollar(Mn)]
VAR tmp = { "10 CT", "18 CT", "28 CT" }
VAR _r1 = ( 80 - cur_score ) * cur_dollar
VAR _r2 = ( 75 - cur_score ) * cur_dollar
RETURN
    SWITCH (
        TRUE (),
        cur_count
            IN tmp
                && cur_score >= 80, _r1,
        cur_count = "40 CT"
            && cur_score >= 75, _r2
    )

vbinbinyumsft_0-1704941580588.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.