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
rachaelwalker
Resolver III
Resolver III

Date1 greater than Date 2 formula

I am looking for help with my DAX formula to show if Install Date > Ship Date then flag it as a 1 otherwise 0. Currently, I am using the formula below but I don't want it to calculate for products with no ship dates. 

 

Past Due Flag = IF('IV_Product'[Install Date] > 'IV_Product'[Ship Date], 1, 0)

 

rachaelwalker_2-1632166997075.png

 

 

 

2 ACCEPTED SOLUTIONS
edhans
Super User
Super User

Try this @rachaelwalker 

Past Due Flag =
IF(
    ISBLANK( 'IV_Product'[Ship Date] ),
    BLANK,
    IF(
        'IV_Product'[Install Date] > 'IV_Product'[Ship Date],
        1,
        0
    )
)

If ShipDate is blank, it returns blank, otherwise it does your normal  1/0 result.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Anonymous
Not applicable

Just a small thing you missed is that you didn't add parenthesis after BLANK. It Should be BLANK().

Everything else is correct.

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

Try this @rachaelwalker 

Past Due Flag =
IF(
    ISBLANK( 'IV_Product'[Ship Date] ),
    BLANK,
    IF(
        'IV_Product'[Install Date] > 'IV_Product'[Ship Date],
        1,
        0
    )
)

If ShipDate is blank, it returns blank, otherwise it does your normal  1/0 result.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Just a small thing you missed is that you didn't add parenthesis after BLANK. It Should be BLANK().

Everything else is correct.

@Anonymous @edhans  Thank you both! 

 

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.