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
sadsmileyface
Regular Visitor

Finding the absolute maximum date in a column

I've tried a number of methods to do what I think is a very simple task but I'm not quite getting the result I expected. I have a column of data containing dates, and I just want to know for that range, what is the maximum date in the range? 

 

I thought that this would work, but it doesnt: Maxdate = CALCULATE(MAX('Availability'[Publishing Date].[Date]))

 

I expected that it would look at the entireitry of the column and return the absolute maximum date found in that column in each row. Instead, it just returns whatever is the date value of that row- so it's just two columns that are the same as each other. 

 

Is this perhaps not the correct thing to use?

 

 

1 ACCEPTED SOLUTION
Omega
Impactful Individual
Impactful Individual

If you are expecting to get the last data from a range of selected dates, then try the below measure/column: 

 

Last Date = MAX('Availability'[Publishing Date])

But, if you are expecting the last date to be always today's date, then try the below measure/column: 

 

Last Date = Today ()

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

You probably want something like:

 

Maxdate = CALCULATE(MAX('Availability'[Publishing Date].[Date]),ALL('Availability'))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks for that- I gave it a shot but it didnt return like I'd hoped.

 

It returns a date of 31st December 2018, when ideally (since today's date is the most recent occurance in the column) it should be returning a maximum of today's date, 5th December 2018.

Omega
Impactful Individual
Impactful Individual

If you are expecting to get the last data from a range of selected dates, then try the below measure/column: 

 

Last Date = MAX('Availability'[Publishing Date])

But, if you are expecting the last date to be always today's date, then try the below measure/column: 

 

Last Date = Today ()

That's it! I used the first one and it worked absolutely perfectly! Thank you!

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