Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top n data

1st table    

AirportRevenue in US$Flights 
Grand Total57,732,036,7571,068,164
Maya-Maya Airport
24,082,856,986467,982
Asmara International Airport
16,156,464,665280,323
Cairo International Airport
10,150,200,885188,215
Tripoli International Airport
3,460,486,57248,468
Cape Town International Airport
2,335,975,37144,474
Calgary International Airport
772,424,866  14,234
Vancouver International Airport
505,395,81211,452
Ontario International Airport
268,231,60113,016

2nd table extracted from 1st table(Top 3 Airports)    

AirportRevenue in US$Flights 
Grand Total50,389,522,535936,520
Maya-Maya Airport
24,082,856,986467,982
Asmara International Airport
16,156,464,665280,323
Cairo International Airport
10,150,200,885188,215

I am having problem in acquiring the result of 2nd table. Can anyone help me? I want to see any top n airports with revenue & flight detail as mentioned in the 2nd table.

8 Replies
pradosh_thakur
Master II
Master II

hi

try this

dimesnison limits-> largest 3 value and dont show  others

will this work for you ?

regards

Pradosh

Learning never stops.
Not applicable
Author

I do not want to use dim limits as I have already used variable vCounter which varies from 0 to 8 where 0 means all airports & remaining numbers for top n. I actually need to know the exact expression to be used for both revenue & flights in case of all or top n.

pradosh_thakur
Master II
Master II

You can use the variable in place of that number something like =$( vCounter) iin the expression. It will be the simplest solution for you.

Learning never stops.
Not applicable
Author

I need to know the exact expression to be used for the issue.

pradosh_thakur
Master II
Master II

can you share your sample app? Please try using =$(variablename ) in the dimensionlimit tab to show the top n value.

Learning never stops.
effinty2112
Master
Master

Hi Arshad,

Try this as your dimension:

Aggr(if(Rank(Sum(Revenue),1,1) <=3,Airport),Airport)

In a straight table check the Suppress When Value Is Null checkbox.

Regards

Andrew

Not applicable
Author

The problem exists in expression tab not in dimension. I need to know exact expression to be used for top n.

effinty2112
Master
Master

Hi Arshad,

Have you tried the calculated dimension? It will give you the top 3 in a straight table.

Regards

Andrew