Forum Discussion
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 |
|
Use the DAX LASTDATE function in a measure:
=LASTDATE(InjuryData[IncidentDate])
2 Replies
- deldersveldResident Rockstar
Use the DAX LASTDATE function in a measure:
=LASTDATE(InjuryData[IncidentDate])
- alj785Frequent Visitor
Thank you! I was trying to add a coumn but the measure worked perfectly!