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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ndeeleysww
Creator
Creator

Top 10 in Set Analysis

Hi there,

It's very easy to create a Top 10 in a table in QlikSense by using the Fixed Number limitation on the dimension,but now I need to carry the top 10 total through to a KPI.

Does anyone know how I apply a top 10 to set analysis to get my total? Here is my set analysis so far:

Count({1<Date={'>=$(=Date($(vTodaysDate)))'}, OpsFunction={'Drinking Water', 'Waste Water'}, DataSource={'Alarms'}, alarm_status={3} >} AlarmCount)

Thanks for your help!

Neil

4 Replies
sunny_talwar

What all are your dimensions? Is there a single dimension or multiple dimension in your chart where you are showing the top 10?

sunny_talwar

May be you can try this if there are multiple dimensions:

Sum(Aggr(If(Rank(Count({1<Date={'>=$(=Date($(vTodaysDate)))'}, OpsFunction={'Drinking Water', 'Waste Water'}, DataSource={'Alarms'}, alarm_status={3} >} AlarmCount) < 11, Count({1<Date={'>=$(=Date($(vTodaysDate)))'}, OpsFunction={'Drinking Water', 'Waste Water'}, DataSource={'Alarms'}, alarm_status={3} >} AlarmCount)), ListAllYourDimensionsHereSeparatedByComma))

ndeeleysww
Creator
Creator
Author

There’s only one dimension, but it’s a concatenated dimension made up of 4 dimensions, which identify a single alarm:

Process & & Asset &

sunny_talwar

Would it be possible to combine those 4 in the script: If you can, then the expression won't need Aggr() statement:

Count({1<Date={'>=$(=Date($(vTodaysDate)))'}, OpsFunction={'Drinking Water', 'Waste Water'}, DataSource={'Alarms'}, alarm_status={3},


Key = {"=Rank(Count({1<Date={'>=$(=Date($(vTodaysDate)))'}, OpsFunction = {'Drinking Water', 'Waste Water'}, DataSource={'Alarms'}, alarm_status={3}>} AlarmCount)) < 11"}


>} AlarmCount)

Here Key is the combination of the 4 fields created in the script