Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
PK1
Partner - Contributor II
Partner - Contributor II

Top n value where n is to be provided by user

I want to create a chart to show Top n value where n is to be provided by user. Kindly help

4 Replies
Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Hi

Create in script dimension

inline load [

uiTopN

5

10

20

50

];

In chart options:

Dimension options > Limits > Fixed count >

Use  =uiTopN dimension as expression

In app:

Use uiTopN as filter with always 1 selected value option or slider extension

 

Regards

miskinmaz
Creator III
Creator III

Instead of using simple expression like sum(sales) try to use below expression

Sum({<Id={'=rank(sum(Sales))<$(vRank)'}>}Sales)

where vRank will be the variable to take the user input.

But the same things needs to be repeated for all the other expression as well

PK1
Partner - Contributor II
Partner - Contributor II
Author

Not able to create dimension getting garbage error while writing the script. Attached the error

 Garbage_Error.PNG

 

inline load [

uiTopN

5

10

20

50

];

 

 

Zhandos_Shotan
Partner - Creator II
Partner - Creator II

It just for example. You can fix it as you want

Correct working script:

LOAD * INLINE [
uiTopN
5
10
20
50
];