Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total of Top 10 Values

Hi All,

I have the top10 ReasonCodes based on the count of a field(ID's).

Now, for these top 10 Reasoncodes i am calculating the Sum of a filed(i.e., sum of Quantity). I want to calculate the Total value of these sum(Quantity) for my top 10 Reasoncodes. If i am using the expression sum(total Quantity), it is giving me the total sum for all the Reasoncodes but not for my top 10 Reasoncodes. Kindly help me in this. Thanks in anticipation:-)

Message was edited by: N Nadiya

12 Replies
vishsaggi
Champion III
Champion III

Your screen shot shows count(Mt_ID) why you using count. You should use Sum(quantity) because you want the rank on individual quantity and sum them. Total quantity here is to display total of 10 values (i.e 155) in each row.


=Sum({<reasoncode ={"=Aggr(Rank(Sum(quantity)), reasoncode)<=10 "}>} Total quantity)

Not applicable
Author

[image: Inline images 2]

Hi Vish.. Please find the attached screenshots of the data.. I have changed

my expression and I want my result to be 7171 which is total sum of the

quantities of my top 10 reasoncodes

(60064021444081961102085882077+200=7171) but the result which i am

getting is 7177(not sure how exactly getting this value) ..

On 3 September 2016 at 02:08, Vish Nagaraju <qcwebmaster@qlikview.com>

sunny_talwar

Not sure why you need to use Aggr() function here, can you try this:

=Sum({<[Reason Code] = {"=Rank(Sum(Quantity)) < 11"}>} Quantity)