• Resolved punitganshani

    (@punitganshani)


    I am trying to build a formula in statistics for tennis, which supports following

    S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against)

    However, I want the value to be either 0 or +ve. How do I apply this condition?

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

    (@rochesterj)

    Hi there!

    Thanks for reaching out.

    You can use the conditionals for that.

    ( (S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against)) > 0 ) * (S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against) )

    The first big parenthesis is checking if the points you have is bigger than zero, if yes it returns one, otherwise it returns zero. Then we multiply the result of our check (one if true, zero if not) by the actual points value.

    So if your points formula returns -1, you’ll have:
    0 * -1 = 0

    And if it’s 9, for example, then you’ll have:
    1 * 9 = 9

    Thanks!

    Thread Starter punitganshani

    (@punitganshani)

    I tried this but the value is appearing 0 for all entries

    Here, https://imgur.com/a/Esybszs

    • This reply was modified 3 years, 5 months ago by punitganshani.
    Roch

    (@rochesterj)

    Hi!

    What did you have as the values for the items that are as zero?

    Or maybe what happens if you add a new column with just this portion:
    (S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against) )
    ?

    Thanks!

    Thread Starter punitganshani

    (@punitganshani)

    I have tried that as well.

    The absolute value is correct

    
    (S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against) )
    

    but when we apply >0 to it, the answer is always 0 instead of 0 (false) or 1 (true)

    
    (S1 (for) + S2 (for) + S3 (for) – S1 (against) – S2 (against) – S3 (against) ) > 0
    

    Screenshot:

    View post on imgur.com

    The Formats I can see in Player Statistics and Team Statistics is Number and Time. Is there a way to enable Variable if that will make a difference?

    • This reply was modified 3 years, 5 months ago by punitganshani.
    Roch

    (@rochesterj)

    Hi there!

    Thanks for testing!

    That’s very odd. We usually don’t do this, but can you send us a message in the presales channel? I’d like to check your setup if possible.
    support.themeboy.com/

    Thanks!

    • This reply was modified 3 years, 5 months ago by Roch.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Statistics – Complex Formula’ is closed to new replies.