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! Request now

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