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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alj785
Frequent Visitor

Show Most Recent Date

Hello,

I have two data sets one with a list of supervisors and another one showing the last time they had an employee injury. Some supervisors have reported multiple injuries and I need to show when the last one occurred and also show which supervisors have not reported any injuries. This is what my data looks like. I tried using combinations of lookupvalue and max but wasn’t having any luck. Any help is appreciated. Thanks!

 

InjuryData

SupID

IncidentDate

12345

1/8/18

12345

3/20/17

51347

6/6/18

69545

6/7/16

69545

3/8/15

34515

9/3/15

 

SupData

SupID

SupName

12345

John Doe

51347

Jane Smith

69545

Mike Jackson

34515

Tom Johnson

78948

Sally Jones

35645

Christine Miller

 

This the final data should look like

SupID

SupName

LastIncidentDate

12345

John Doe

1/8/18

51347

Jane Smith

6/6/18

69545

Mike Jackson

6/7/16

34515

Tom Johnson

9/3/15

78948

Sally Jones

 

35645

Christine Miller

 

 

1 ACCEPTED SOLUTION

Use the DAX LASTDATE function in a measure:

=LASTDATE(InjuryData[IncidentDate])

View solution in original post

2 REPLIES 2

Use the DAX LASTDATE function in a measure:

=LASTDATE(InjuryData[IncidentDate])

Thank you! I was trying to add a coumn but the measure worked perfectly!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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