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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Min and max comparing to 2 columns

Hi Team,

I have 4 date columns I need to display min and max.

Min Date : I want to look if "actula start date" has date pick the min or if it is blank then look the value from "Planned Start Date".

Max Date : Similar as Min date but columns are "Planned Closed Date" &  "Actual Closed Date".

Here is my data. 

My out look is :

Min Date : 1/1/2020

Max Date : 1/6/2021

 

ProjectSub Project Planned Start DatePlanned Closed DateActual Start DateActual Closed Date
AAA1/12/20201/12/20211/2/2021 
AAB1/1/20201/6/20201/4/20201/10/2020
AAC1/6/20211/12/2021  
BBA1/5/20211/12/2021  
BBB1/4/20201/6/20201/6/20201/8/2021
BBC1/3/20211/5/20211/4/20211/6/2021

 

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Anonymous ,

 

you can do that with a measure like that:

Min Date = IF( MIN( 'Table'[Actual Start Date]) <> BLANK(), MIN( 'Table'[Actual Start Date] ), MIN( 'Table'[Planned Start Date] ) )

 

Similar then for the MAX.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

you could do something like this

 

mindate =
IF (
    ISBLANK ( [actual start date] ),
    min([planned Start Date]),
    min([actual start date])
)

 

you can do similar for the max date





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




selimovd
Super User
Super User

Hey @Anonymous ,

 

you can do that with a measure like that:

Min Date = IF( MIN( 'Table'[Actual Start Date]) <> BLANK(), MIN( 'Table'[Actual Start Date] ), MIN( 'Table'[Planned Start Date] ) )

 

Similar then for the MAX.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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