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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Dowsey77
New Member

Max of 2 Date Values

Hi,

In Power Query I have a table with 2 date columns.  I use Table.TransformColumnTypes(#"Inserted Maximum",{{"Date1", type date}, {"Date2", type date}, {"Maximum", type date}}) in order to obtain the max of the 2 date values.  This seems to work in Power Query and I see the max of the 2 dates for each row in the table.  When I then apply this to Power BI, the max date then applies to the maximum of the 2 columns in their entirety and not for each row.  If I go back to "Transform Data" the maximum dates are definitely for each row, but this is lost when applying to Power BI.

 

Any ideas what I am doing wrong and/or how to obtain the max date for each row from 2 columns?

 

Thanks in advance,
Dowsey

2 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

in DAX, it is like:

Column = MAX( [Date1], [Date2] )

View solution in original post

amitchandak
Super User
Super User

@Dowsey77 , seem like @FreemanZ  already give DAX a solution, refer to that first. If that dos work, consider this 

 

Hope you have taken MAX before it

 

a new column

 

Maximum = List.Max({[Date1], [Date2]})

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Dowsey77 , seem like @FreemanZ  already give DAX a solution, refer to that first. If that dos work, consider this 

 

Hope you have taken MAX before it

 

a new column

 

Maximum = List.Max({[Date1], [Date2]})

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
FreemanZ
Super User
Super User

in DAX, it is like:

Column = MAX( [Date1], [Date2] )

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors