I am helping out with a game tournament that allows spectators to “bet” what amounts to monopoly money on the matches (think Blaseball).
To keep track of the bets, I have one large table where each row contains a bet with its amount, match ID, the spectator placing it etc.
For the sake of fun statistics, I want to find the MEDIAN() of the bets for each individual match, as well as for each round, each bettor etc. independently.
My attempts that have failed so far:
- For things like MIN, MAX, SUM and AVERAGE there are MINIFS, MAXIFS, SUMIFS and AVERAGIFS, but MEDIAN has no such built-in function.
- I have tried to “filter” the results with MEDIAN(IF([condition], [range]), [some other value MEDIAN will ignore]), but I have been unable to find any values that MEDIAN will actually “ignore” (the way the aforementioned functions ignore e.g. text values). It will throw an error if passed strings, even empty ones. It will interpret FALSE as a 0 and skew the results, return #N/A if any input value is #N/A, etc.
- I have tried to find a way to simply remove non-matching values from the array based on the condition, but Excel’s FILTER() function seems to not have any equivalent within Calc. (@Lupp, there’s one example of a useful newer formula addition for you.)
How can I solve this problem?