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! Learn more

Reply
Anonymous
Not applicable

Switch Statement Not Working

None of my other columns required a switch function.  The if statements are working on their own, but not when put together.  Any help would be appreciated.
 
Treasured2005_0-1659709547505.png

 

Days for IV Approval =
SWITCH (
IF(ISBLANK([Ready for Treasury Approval]) && ISBLANK([Ready for Credit Approval]) && ISBLANK([Ready for Tax Approval]) && ISBLANK([Ready for Category Manager Approval]) && NOT(ISBLANK([Submitted to Workflow])) && NOT(ISBLANK([Ready for Independent Validation Approval])),
    [Ready for Independent Validation Approval] - [Submitted to Workflow]),
IF(ISBLANK([Ready for Treasury Approval]) && ISBLANK([Ready for Credit Approval]) && ISBLANK([Ready for Tax Approval]) && NOT(ISBLANK([Ready for Category Manager Approval])) && NOT(ISBLANK([Ready for Independent Validation Approval])) && NOT(ISBLANK([Submitted to Workflow])),
    [Ready for Independent Validation Approval] - [Ready for Category Manager Approval]),
IF(ISBLANK([Ready for Treasury Approval]) && ISBLANK([Ready for Credit Approval]) && NOT(ISBLANK([Ready for Tax Approval])) && NOT(ISBLANK([Ready for Independent Validation Approval])) && NOT(ISBLANK([Submitted to Workflow])),
    [Ready for Independent Validation Approval] - [Ready for Tax Approval]),
IF(ISBLANK([Ready for Treasury Approval]) && NOT(ISBLANK([Ready for Credit Approval])) && NOT(ISBLANK([Ready for Independent Validation Approval])) && NOT(ISBLANK([Submitted to Workflow])),
    [Ready for Independent Validation Approval] - [Ready for Credit Approval]),
IF(NOT(ISBLANK([Ready for Treasury Approval])) && NOT(ISBLANK([Ready for Independent Validation Approval])) && NOT(ISBLANK([Submitted to Workflow])),
    [Ready for Independent Validation Approval] - [Ready for Treasury Approval])
)
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You don't need the IF statements within SWITCH, try

Days for IV Approval =
SWITCH (
    TRUE (),
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && ISBLANK ( [Ready for Tax Approval] )
        && ISBLANK ( [Ready for Category Manager Approval] )
        && NOT ( ISBLANK ( [Submitted to Workflow] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) ), [Ready for Independent Validation Approval] - [Submitted to Workflow],
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && ISBLANK ( [Ready for Tax Approval] )
        && NOT ( ISBLANK ( [Ready for Category Manager Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ),
        [Ready for Independent Validation Approval] - [Ready for Category Manager Approval],
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && NOT ( ISBLANK ( [Ready for Tax Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Tax Approval],
    ISBLANK ( [Ready for Treasury Approval] )
        && NOT ( ISBLANK ( [Ready for Credit Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Credit Approval],
    NOT ( ISBLANK ( [Ready for Treasury Approval] ) )
        && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
            && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Treasury Approval]
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you!

 

johnt75
Super User
Super User

You don't need the IF statements within SWITCH, try

Days for IV Approval =
SWITCH (
    TRUE (),
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && ISBLANK ( [Ready for Tax Approval] )
        && ISBLANK ( [Ready for Category Manager Approval] )
        && NOT ( ISBLANK ( [Submitted to Workflow] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) ), [Ready for Independent Validation Approval] - [Submitted to Workflow],
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && ISBLANK ( [Ready for Tax Approval] )
        && NOT ( ISBLANK ( [Ready for Category Manager Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ),
        [Ready for Independent Validation Approval] - [Ready for Category Manager Approval],
    ISBLANK ( [Ready for Treasury Approval] )
        && ISBLANK ( [Ready for Credit Approval] )
        && NOT ( ISBLANK ( [Ready for Tax Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Tax Approval],
    ISBLANK ( [Ready for Treasury Approval] )
        && NOT ( ISBLANK ( [Ready for Credit Approval] ) )
            && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
                && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Credit Approval],
    NOT ( ISBLANK ( [Ready for Treasury Approval] ) )
        && NOT ( ISBLANK ( [Ready for Independent Validation Approval] ) )
            && NOT ( ISBLANK ( [Submitted to Workflow] ) ), [Ready for Independent Validation Approval] - [Ready for Treasury Approval]
)

Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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