3 Replies Latest reply on Nov 22, 2018 3:44 AM by Yuriy Fal

    Percentile on unique ID

    nicolas.sinquin.51

      Hye,

       

      I'm in trouble with a percentile calculation.

      I've some data like this

       

      I want the percentile by ID even if there is 3 or more id2.

       

      my formula is

      IF [Income] <= {PERCENTILE([Income], .1)} THEN "<10%"

      ELSEIF [Income] <= {PERCENTILE([Income], .2)} THEN "20%"

      ELSEIF [Income] <= {PERCENTILE([Income], .3)} THEN "30%"

      ELSEIF [Income] <= {PERCENTILE([Income], .4)} THEN "40%"

      ELSEIF [Income] <= {PERCENTILE([Income], .5)} THEN "50%"

      ELSEIF [Income] <= {PERCENTILE([Income], .6)} THEN "60%"

      ELSEIF [Income] <= {PERCENTILE([Income], .7)} THEN "70%"

      ELSEIF [Income] <= {PERCENTILE([Income], .8)} THEN "80%"

      ELSEIF [Income] <= {PERCENTILE([Income], .9)} THEN "90%"

      ELSE "100%"

      END

       

      but i's not what i expect( i only get the wrong one)

       

                                                                      RIGHT   (what i expect)                                                                                                                                    WRONG  (what i get )

                                   

       

       

       

      I put a twbx.

       

      Thanks for your help.