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

Finding the earliest date between two colomns

Im looking to identify the earliest date between the two colomns in the same row.

 

Example data

Input Output
First StartSecond Start Date
15/03/202115/09/2022 15/03/2021
17/03/20211/03/2021 1/03/2021
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create a column.

Column =
VAR first_date = 'Table'[First Start]
VAR second_date = 'Table'[Second Start]
RETURN
    IF ( first_date > second_date, second_date, first_date )

Or a measure.

Measure =
VAR start_1 =
    MAX ( 'Table'[First Start] )
VAR second_2 =
    MAX ( 'Table'[Second Start] )
RETURN
    IF ( start_1 > second_2, second_2, start_1 )

vpollymsft_0-1646635130016.png

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create a column.

Column =
VAR first_date = 'Table'[First Start]
VAR second_date = 'Table'[Second Start]
RETURN
    IF ( first_date > second_date, second_date, first_date )

Or a measure.

Measure =
VAR start_1 =
    MAX ( 'Table'[First Start] )
VAR second_2 =
    MAX ( 'Table'[Second Start] )
RETURN
    IF ( start_1 > second_2, second_2, start_1 )

vpollymsft_0-1646635130016.png

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Jihwan_Kim
Super User
Super User

 

Hi,

Please check the below picture and the attached pbix file.

it is for creating a new table.

 

Picture1.png

 

Output Table =
SELECTCOLUMNS ( Input, "Date", MIN ( Input[First Start], Input[Second Start] ) )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thanks that worked and thanks for showing me the min fucntion. I just tweaked it not to create a new table

MIN ( Input[First Start], Input[Second Start] ) )

 

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.