cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Regular Visitor

## Multiple conditions to check

Hello All, need help in calcualting value based on multiple conditions mentioned below ... Please advice

1> If "Cell Number" <> "NA", then

2> If "Pages" is >= "Min Pages", then

3> If "Cell" is = A, then

4> If "PEH" is <=8,"Q"*0.25,If "PEH" is <=10,"Q"*0.50,If "PEH" is <=12,"Q"*0.75,If "PEH" is <=14,"Q"*1.0, else

5> If "Cell" is = B, then

6> If "PEH" is <=8,"Q"*0.20,If "PEH" is <=10,"Q"*0.40,If "PEH" is <=12,"Q"*0.65,If "PEH" is <=14,"Q"*1.0, else

7> If "Cell" is = C, then

8> If "PEH" is <=10,"Q"*0.40,If "PEH" is <=12,"Q"*0.60,If "PEH" is <=14,"Q"*0.85,If "PEH" is <=16,"Q"*1.0,

9> else "Q"

10> else "0"

1 ACCEPTED SOLUTION
Solution Supplier

@Navin_C If it worked for you then please mark that as an accepted solution so that other users can find it more easily.

Thank You!

3 REPLIES 3
Solution Supplier

@Navin_C You can write a DAX formula like this:

``````value
=IF([Cell Number]<>"NA",
IF([Pages]>=[Min Pages],
SWITCH([Cell],
"A", SWITCH(TRUE(),
[PEH]<=8,"Q"*0.25,
[PEH]<=10,"Q"*0.50,
[PEH]<=12,"Q"*0.75,
[PEH]<=14,"Q"*1.0,
"Q"
),
"B", SWITCH(TRUE(),
[PEH]<=8,"Q"*0.20,
[PEH]<=10,"Q"*0.40,
[PEH]<=12,"Q"*0.65,
[PEH]<=14,"Q"*1.0,
"Q"
),
"C", SWITCH(TRUE(),
[PEH]<=10,"Q"*0.40,
[PEH]<=12,"Q"*0.60,
[PEH]<=14,"Q"*0.85,
[PEH]<=16,"Q"*1.0,
"Q"
),
"Q"
),
"0"
),
"0"
)``````

If you find this insightful, please provide a Kudo and accept this as a solution.

Regular Visitor

Thanks Devesh

Solution Supplier

@Navin_C If it worked for you then please mark that as an accepted solution so that other users can find it more easily.

Thank You!

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors