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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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