google sheets – Getting the latest date of something happening (with conditions)

So basically, I’ve got two sheets. One (sheet_1) with every single record in the system (over 11000 rows) and the other one (sheet_2) is querying information from that sheet. The relevant information to know is that sheet_1 has 3 columns of interest to me; name of person, thing he/she did and the date he did it. Now in sheet_2, I’m attempting to create a sort of report about that person, showing all information from sheet_1 that is relevant to that person.

I’ve made sort of a statistics section in sheet_2 which shows the incident type, number of times its happened and when was the last time it did happen. What I cant figure out is how to do the “when was the last time it did happen” column.

My first thought was an if function but that didn’t work since there was no logic there, so ill give you a more clear explanation of what should happen in the cell:

Cell is supposed to first check the type of incident and the name of the person (both in sheet_2) then cross reference that with sheet_1 and get the “maximum or latest date” for that type of incident for that specific person.