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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to Identify the most recent record - error

Hi all,

I've been at this for a while, and cannot seem to get it right!

 

I have a table of data that gets updated by users when there is an update to a job.

I am looking to find a way to identify the date of the most recent note per job number, then show the note relating to this date and job number.

 

I created two measures

MostRecentDate = MAX('Expediting notes'[Date of Note])

&

MostRecentDescription =
LOOKUPVALUE(

'Expediting notes'[Expediting Notes],
'Expediting notes'[Date of Note],
[MostRecentDate],
'Expediting notes'[EMIR Job number],
MAX('Expediting notes'[EMIR Job number]))

 

The first part works fine, and from testing it it brings back the max date.

 

The issue comes from the 2nd part:

chrisdotnisbet1_0-1606493534116.png

 

Could this be that there are some instances where there are 2 or more updated notes from the same date stamp?

If so, what do you recommend that I do to overcome the issue?

 

Thanks,

Chris

 

6 REPLIES 6
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

MostRecentDescription =
LOOKUPVALUE (
    'Expediting notes'[Expediting Notes],
    'Expediting notes'[Date of Note], [MostRecentDate],
    'Expediting notes'[EMIR Job number], MAX ( 'Expediting notes'[EMIR Job number] ),
    'Expediting notes'[Expediting Notes], MAX ( 'Expediting notes'[Expediting Notes] )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Any chance you could provide a small sample of your data please?

It sounds like it could be resolved in Power Query by creating a combined field of [Job Number] & [Date], for example, but need to see the data to ensure I understand the problem correctly.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Yeah, no worries:

 

chrisdotnisbet1_0-1606506651621.png

 

There aren't too many columns - this is a simple sheet used to provide quick updates regarding job details.

 

I know the sample isnt too extensive, but it should give you an idea of the data contained.

 

Regarding a concat between job number and date of note - I dont think this would work, as the job number is constant right throughout its journey, but I'm definitely not an expert! 

 

Maybe I need to add a column into the data regarding what the number of that update is for that day.

This way, I would know that update number should be max

 

Thoughts?

Hi,

Share a simple dataset and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I opted to go back to my original source, removed the 1 record that had two entries for the same day (as they were duplicates), refreshed the dashboard and the measure worked.

 

I will just ensure that the source can only have one update per day.

Anonymous
Not applicable

In the data you can see that there are Job numbers in the left most column, followed by Job Name, the date of the note, and finally the note that has been left.

 

My goal is to identify the most recent note, and the date that the note was added to the list.

 

As mentioned in my post, it could be that there are some instances where there are two updated notes for the same job on the same day. As such I think this is what is causing the issue and resulting in the error.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.