libreoffice Calc run a calculation on a part of a range

0
down vote
favorite

I have data about 3 columns in my LibreOffice Calc sheet: who, where, when.

I want to make statistics about the when dates. something like a SUM.IF to filter people, but not a SUM. i want to get STDEV on dates but only for one people at a time. how could i set a dynamic filter for a range, or a query? but not a view filter.

something like a

SELECT dates in MyRange WHERE
who=‘abrasive guy’

in SQL, but working in LibreOffice Calc. so that i would have a table presenting for each of the thousand people a standard derivation of presence.
i have a workaround with DSTDEV, but it is ugly, i have to make small tables of 2x2 for each who containing:
“who, date”
"=a, "

what i am looking for is something like this:


i already know how to get occurences with a COUNTIF.
“écart jours moyen” is standard derivation,
“dernière vue” is doable with MAX on a date range. all i have to figure out is a good way to filter dates depending on who.

You possibly want MAXIFS, available since 5.2 iirc.

=MAXIFS($B$3:$B$12;$A$3:$A$12;"a")