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! Learn more

Reply
Anonymous
Not applicable

Got Max Value Correct But Date Corresponding to this is wrong

Hi Guys,

 

I need your guidance, I have a table and in this table i have Id and date and forums I need output like Id Max Forum and date.

 

But the issue i am facing is Id i got correct max i got correct against that Id but the date correspond to this id and max form is inccorect 

 

In below picture Id is 221 and Max Forum is 170 but date is wrong date should be 30-07-2021

 

 

usamazaid222_0-1650444763960.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

From your picture, currently your Date column returns the minimum date of an Id. If I understand it correctly, your purpose is to get the max value for every Id and the corresponding date of that max value, right? You need to create a measure to get the corresponding date and put it into the matrix visual instead. 

 

Measure

Max Date = 
var _maxForums = MAX('Table'[Forums])
return
CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table','Table'[Id]),'Table'[Forums]=_maxForums)

vjingzhang_0-1650942235773.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

From your picture, currently your Date column returns the minimum date of an Id. If I understand it correctly, your purpose is to get the max value for every Id and the corresponding date of that max value, right? You need to create a measure to get the corresponding date and put it into the matrix visual instead. 

 

Measure

Max Date = 
var _maxForums = MAX('Table'[Forums])
return
CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table','Table'[Id]),'Table'[Forums]=_maxForums)

vjingzhang_0-1650942235773.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

MFelix
Super User
Super User

Hi @Anonymous ,

 

Looking at your data the results are correct, in the image you present the values for 221 don't include the value 30/07/2021 where does this value comes from? is it from another table? Isn't your image complete?

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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