Percentile functionality

Hi folks,

I am trying to get the top 0.90 percentile for NPS score and participatoin of some departments. The data is as such
Now, in Jupiter notebook, I am able to write the code for percentile for both, as shown below
But since, in Quicksight, nesting of aggregated function is not allowed, I am not able to arrive at the same scores.
For your reference, NPS value is %Promoters - %Detractors
Can someone guide me as to how this number can be achieved?

Can you do a percentile?

percentileDisc( {nps} , 90)

Hi @Max , so like I mentioned, the enps is an aggregated column; a calculated field - where we calculate %Promoters - %Detractors. To this, I am getting the error of nesting of aggregated function is not allowed. So need a work around for this.

What is that calculated field?

nps is the calculated field

How is that calculated? Can you give me the formula?

%promoters - %detractors

Can you try and do this with a distinctCountOver with an ifelse instead of distct_Countif.


You will need to replace the bold part with your nps score with distinctCountOvers and ifelses.

Let me know if that helps.

1 Like