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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Navin_C
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

@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!

View solution in original post

3 REPLIES 3
devesh_gupta
Super User
Super User

@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.

Thanks Devesh

@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!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.