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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
erikjanpoelen
Frequent Visitor

Return the minimum date when comparing two date columns (while ignoring blanks)

I want to retrieve the earliest date out of two date colums.

 

However, the MIN function does not help me as it sees BLANKS as 0, thus choosing BLANKS over a date, while I am looking for the date when the other column is empty.

 

Is there a work-around available? Excel seems to do this just fine.

 

test.PNG

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @erikjanpoelen

As tested, Ronald123's solution will retuen the min date for two column.

11.png

If you'd like this, please take this suggestion.

However, it seems you'd like to get min date by comparing two column, if one is blank, return the date instead of blank.

If so, please create a column

Column 3 = IF([date1]=BLANK(),[date2],IF([date2]=BLANK(),[date1],MIN([date1],[date2])))

12.png

 

 

Best Regards

Maggie

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @erikjanpoelen

As tested, Ronald123's solution will retuen the min date for two column.

11.png

If you'd like this, please take this suggestion.

However, it seems you'd like to get min date by comparing two column, if one is blank, return the date instead of blank.

If so, please create a column

Column 3 = IF([date1]=BLANK(),[date2],IF([date2]=BLANK(),[date1],MIN([date1],[date2])))

12.png

 

 

Best Regards

Maggie

Ronald123
Resolver III
Resolver III

Hello @erikjanpoelen,

 

Try this measure;

 

Naamloos.png

Greets,

 

Ronald

Greg_Deckler
Community Champion
Community Champion

Perhaps use MINX with a FILTER to weed out the BLANKS?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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