4 Replies Latest reply: Aug 2, 2016 10:59 AM by Sunny Talwar RSS

    Top 10 in Set Analysis

    Neil Deeley

      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

        • Re: Top 10 in Set Analysis
          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?

            • Re: Top 10 in Set Analysis
              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))

              • Re: Top 10 in Set Analysis
                Neil Deeley

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

                 

                Process &  & Asset &

                  • Re: Top 10 in Set Analysis
                    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