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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |