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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
ArchStanton
Impactful Individual
Impactful Individual

OR Statement ?

Hi,
I have this DAX code that needs one more condition which is that if Resolution Date ISBLANK then BLANK().

No of working days = 
VAR Start_Date = SELECTEDVALUE('Cases'[Created On])
VAR End_Date = SELECTEDVALUE('Cases'[Resolution Date])
VAR Network_Days = NETWORKDAYS(Start_Date,End_Date,1)
RETURN
IF(Network_Days = 0,Network_Days +1, 
    Network_Days)

 

Where can I add this extra condition?

1 ACCEPTED SOLUTION
quantumudit
Super User
Super User

Hello @ArchStanton 

You can use nested IF statement in DAX as follows:

 

No of working days =
VAR Start_Date =
    SELECTEDVALUE ( 'Cases'[Created On] )
VAR End_Date =
    SELECTEDVALUE ( 'Cases'[Resolution Date] )
VAR Network_Days =
    NETWORKDAYS ( Start_Date, End_Date, 1 )
RETURN
    IF (
        End_Date = BLANK (),
        BLANK (),
        IF ( Network_Days = 0, Network_Days + 1, Network_Days )
    )

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

 

Proud to be a Super User

 

 

View solution in original post

2 REPLIES 2
quantumudit
Super User
Super User

Hello @ArchStanton 

You can use nested IF statement in DAX as follows:

 

No of working days =
VAR Start_Date =
    SELECTEDVALUE ( 'Cases'[Created On] )
VAR End_Date =
    SELECTEDVALUE ( 'Cases'[Resolution Date] )
VAR Network_Days =
    NETWORKDAYS ( Start_Date, End_Date, 1 )
RETURN
    IF (
        End_Date = BLANK (),
        BLANK (),
        IF ( Network_Days = 0, Network_Days + 1, Network_Days )
    )

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

 

Proud to be a Super User

 

 

Awesome, thanks!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.