• Resolved scottfreeman

    (@scottfreeman)


    Hi! I have an issue, which is possibly a feature request. Please point me in the proper direction if this isn’t the place.

    Scenario:
    I have a Player List that shows all players ordered by “points differential”. The point differential can be positive, negative, or zero (ie; 4 points for, 4 points against, 0 points differential).

    The issue I have is the “skip if zero” option.

    I want to show players that have points for or against, AND sort by differential, even if that differential is zero.

    By ticking “skip if zero”, those players are (false positive) skipped.

    Bu unticking “skip if zero”, those players are included, but so are players that have no points for/against (ie; never played).

    I’d like to see the filter of player criteria extended, ie: “include if [player performance] [</>/=] [int]”

    This would separate the “sort by” and “filter”, making the player lists a little more extensible.

    Thanks for reading!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out and I’m sorry for the trouble.

    In this case, this is probably a feature request. But I think it would be fun to try a math-only solution for this.

    Either way, please use this channel for feature requests (as this is a great idea!):
    https://tboy.co/ideas

    Now back to your issue. We need to differentiate the cases where “points pro” AND “points against” are zero from the case where “points pro” and “points against” have the exact same value. So we have two possibilities:

    0 – 0 = 0
    X – X = 0

    In addition, we need to keep this the same way it is for current players, where Pro and Against have different values:

    X – Y = N

    So, what we need is a formula where the first case is zero, but the second is an integer ( f(x) /= 0 for all X except zero ). This formula should keep the current ordering as well.

    The secret here is that we can actually modify the numbers, as long as you display only your current stat (so users won’t even know that there is this new ordering stat). Here is how I sould do it:

    Create a new stat:
    ( ( points for > 0 ) * ( points against > 0 ) ) * ( ( points for >= points against ) * ( 1 + points for – points against ) + ( points against > points for ) * ( points for – points against) )

    In short what this formula is saying is:
    IF points for is positive AND points against is positive ( so non-zero values )
    THEN {
    IF points for is bigger than or equal to points against ( positive net poits) ADD ONE to net points
    ELSE (negative net points) just use net points
    }

    This should be enough to create an ordering criteria that you can use in your “sort by” option and use the skip zero. Just make sure to hide this column from your users and show only the regular net points ??

    Thanks!

    Thread Starter scottfreeman

    (@scottfreeman)

    This is next level crazy maths, and I love it!

    I had to do a tweak to your formula, but it works a charm.

    View post on imgur.com

    BPF = Blocker Points For
    BPA = Blocker Points Against
    BJ = Blocker Jams (ie; times played)

    Sometimes a blocker can get zero points for AND against, but has played.

    Again, thank you SO MUCH for your help!

    Roch

    (@rochesterj)

    Hi!

    That’s amazing, and you’ve tweaked it very well. I’m glad this worked for you ??

    If you need anything else, just let us know.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Player List ‘Sort By’ & ‘Skip if Zero’’ is closed to new replies.