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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
shannon8000
Frequent Visitor

Filter to most recent employee record

Hello!

I have a dilemna.  I have employee records where each time a change is made to their profile, a new record is generated.

 

With that, I need to filter for all to return only the most recently updated record for each. Below is a generic sample of what I am working with.  I need to be able to filter out the older records from the report view.  I've searched the forums and have not found something so specfic as this ask.  Basic and advanced filtering do not have applicable options in this scenario.  Longer term employees can have hundreds of records.

EmployeeUnique IdentifierRecord Last Modified
Smith, Joexchkihs1/25/20249:35:20 AM
Smith, Joexchkihs5/1/202410:35:17 AM
Steven, Suedkslsjs12/1/20235:55:26 PM
Steven, Suedkslsjs6/1/20247:37:15 AM
1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Simple enough,

ThxAlot_0-1717827590801.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
shannon8000
Frequent Visitor

Thank you all!  Each of these options are great!😍

ThxAlot
Super User
Super User

Simple enough,

ThxAlot_0-1717827590801.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Ashish_Mathur
Super User
Super User

Hi,

This M code works

let
    Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Employee", type text}, {"Unique Identifier", type text}, {"Record Last Modified", type datetime}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Employee"}, {{"Count", each Table.Max(_,"Record Last Modified")}}),
    #"Expanded Count" = Table.ExpandRecordColumn(#"Grouped Rows", "Count", {"Unique Identifier", "Record Last Modified"}, {"Unique Identifier", "Record Last Modified"})
in
    #"Expanded Count"

Hope this helps.

Ashish_Mathur_0-1717816078022.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_1.png

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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