2 Replies Latest reply on Dec 7, 2015 5:45 PM by Esther Aller

    Decile analysis

    Tomas Greif

      Is there a way how to bin measure into deciles and use it as dimension? I am looking for equivalent of the following SQL in Tableau:

       

      select
        decile,
        count(*),
        avg(probability)
      from(
        select 
        probability,
        ntile(10) over(order by probability) decile
        from 
        my_table 
      ) a
      group by
        decile
      order by 
        decile
      

       

      I thought that I can use function like rank_percentile(), but cannot figure out how.