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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Formula for nested ifs condition

Hi,

 

Would like to seek your help on the below. 

 

if Priority = 2 hours, then Pass, if not 2 hours, then failed, 

if Priority = 4 hours, then Pass, if not 4 hours, then failed

 

 

Thank you so much for your answers. God Bless You

 

 

1 ACCEPTED SOLUTION

Try this:

IF (
    priority = "p1",
    IF (
        duration <= 2,
        "Pass",
        "Fail"
    ),
    IF (
        priority = "p2",
        IF (
            duration <= 4,
            "Pass",
            "Fail"
        ),
        BLANK ()
    )
)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

how about if priority and duration are on a different table?

Anonymous
Not applicable

that worked. thank you very much. 🙂

PabloDeheza
Solution Sage
Solution Sage

Hi there!

Try something like this:

SWITCH(
	SELECTEDVALUE( Priority ),
	"2 hours", "Pass",
	"4 hours", "Pass",
	"failed"
)

If your priority column is numeric then dont use double quotes.

Let me know if that helps!

Anonymous
Not applicable

hi, in bo the formula should be:

 

if (priority = p1, then (if duration <= 2,  "pass", "fail") elseif (priority=p2, then (if duration >=4, "pass", "fail")

else "null"

Try this:

IF (
    priority = "p1",
    IF (
        duration <= 2,
        "Pass",
        "Fail"
    ),
    IF (
        priority = "p2",
        IF (
            duration <= 4,
            "Pass",
            "Fail"
        ),
        BLANK ()
    )
)

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.