Question

Percentiles in pivot tables

  • 5 January 2018
  • 2 replies
  • 1608 views

Is it possible to get column percentiles using pivot? I’m trying to get the top 10% of rows (‘cost’) for Dec, Oct, Nov within a pivot. For example, my table looks like the following and I would like to calculate the top% per month.



Month| Oct, Nov , Dec



  ID| cost, cost, cost

1 | $2, $4, $6

2 | $1, $9, $7

3 | $3, $1, $5

2 replies

Userlevel 3

@bw2007



To get column percentiles we would want a table calc like this to give us the 90th percentile of each column.


percentile(${table_name.cost}, (1-0.10))



But to be honest I’m a little bit confused by your goal, do you mind sharing a bit more of what you mean by the top 10% of rows?



Is this perhaps similar to what you are looking for?




Userlevel 1

@jeffrey.martinez The link you shared above doesn’t work, and this is exactly what I’m trying to do - would it be possible for you to point me to a more recent example for Cumulative Density? 

Reply