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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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

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