Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 |
|
Solved! Go to Solution.
Use the DAX LASTDATE function in a measure:
=LASTDATE(InjuryData[IncidentDate])
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |