Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am looking to modify a straight table to fix a null appearing. The table has Players, their most common Position over a set number of a competition's Rounds. All three fields are text values.
Mode won't work because some will have two Positions as their most repeated. I have tried working with firstsortedvalue and aggregates but can't come to a solution. If it is possible to work this in an expression instead of the load script that would be best, but I would use the script if there is no other way.
Here is a small table to show the data. The main table will have just one row per player and doesn't show rounds.
If a player has two positions that are equally frequent, what is the expected result? That seems to be your problem with using existing functions, but you haven't actually defined the logic for what you want to see in that scenario...
Have a look at this thread for a similar scenario, where the requirement was to concatenate the most frequent values. You can probably work off that to come up with any other required result.
I must have deleted that part when I was editing my comment. In each row, the table has to show any of the tied Positions, doesn't matter which one, instead of Null. I will have a look at that link thanks.
Maybe this blog post might be of interest.
Computing the Mode in a Multimodal dataset