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
joep78
Helper III
Helper III

MAX value date field

Hi all,

 

I'm looking for a solution to get the MAX value of a date field but based on another value of another column. hereby a snapshot of the table with only the relavant column:

 

SyscodeNameContract end dateContract code
19Automatic renewal +1 yearmaandag 31 juli 202866
18Renewal +5 yearszaterdag 31 juli 203266
21Renewal +5 yearsvrijdag 14 september 202968
22Automatic renewal +1 yearzondag 14 september 202568

 

I have a contract code (66 & 68) and both have to renewal options. 1 for 1 year, the other for 5 yrs. I'm only interested in the option with the highest contract end date. This count ofcourse per each contract. Does anybody have a solution for this. I was not able to figure this one out with MAX/FILTER or any other solution.

 

Thanks in advance for support.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Joe - 

 

Is this what you are after (please see attached image). It is a matrix visual btw, and it has only the max date values you are after. It is a measure created and I used it in the matrix visual. If you confirm that is what you are after, I will be able to share the measure as well.

 

 

 

 

925532.PNG

 

Regards

Eswar

 

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @joep78 ,

If you use FILTER('Table','Table'[Contract end date] = MAX('Table'[Contract end date])) , the result is from the highest contract end date. How do you calculate it? Can you please share your formulas and show the expected results?  Then we will understand clearly and solve it quickly.

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Joe - 

 

Is this what you are after (please see attached image). It is a matrix visual btw, and it has only the max date values you are after. It is a measure created and I used it in the matrix visual. If you confirm that is what you are after, I will be able to share the measure as well.

 

 

 

 

925532.PNG

 

Regards

Eswar

 

Hi Eswar,

 

I think this is the solution i'm looking for with the only diference that for contract 68 the max year should be  Friday 14 september 2029. 

 

IS it possible to share the meassure so i'm able to test this. thanks in advance for your reply.

 

regards, Joep

amitchandak
Super User
Super User

Try like

calculate(count([Syscode]),filter(all(table),table[Contract end date]=max(table[Contract end date])))

 

prefer to join Contract end date with the date of date dimension and try

 

calculate(count([Syscode]),filter(all(date),date[date]=max(date[date])))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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