Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vinod2086
Contributor II

Displaying top 10% and bottom 10 %in chart

Hi All,

i have a requirement to display top 10 % and Bottom 10% based on KM/lit.

i have a fields ID and KM/Lit.

KM/Lit=(sum(Diff_distance_drive)/sum(Diff_total_fuel_consumption)

=Aggr(if(rank(sum(Diff_distance_drive)/sum(Diff_total_fuel_consumption))<=,VIN,NULL()),VIN)

i have used above expression and able to display top 10 values but i want to display top 10%

e.g: i have total 60 id are present. here i need to calculate 60*(10/100)=6 6 is top 10% values.

Please help me

IDKM/Lit
1214.11
1234.72
1243.30
1253.06
1263.08
1273.75
1283.88
1293.91
1304.29
13113.42
1324.10
1332.83
1343.91
1353.91
1363.64

Thanks in advance.

3 Replies
agigliotti
Honored Contributor II

Re: Displaying top 10% and bottom 10 %in Gauge chart

i suggest you to take a look at http://www.qlikfix.com/2010/10/08/decile-analysis/

it might help you.

vinod2086
Contributor II

Re: Displaying top 10% and bottom 10 %in Gauge chart

Hi Andrea,

I had tried but not getting expected output.

balabhaskarqlik
Honored Contributor

Re: Displaying top 10% and bottom 10 %in Gauge chart

You should create Cumulative percentage first, from there consider the percentages.

https://community.qlik.com/thread/262873

https://community.qlik.com/thread/128533

Use the below type of expression for percentage considerations and use these expressions in Min, Max Range limits of Gauge chart.

Sum({<Week={'>=$(=Max(Week)-4) <=$(=Max(Week))'}>}Data)

Community Browser