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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
erichuang
Contributor III
Contributor III

How to get top n number of total in Text field

Hi all,

As the attachment, I made an accumulation in straight table and highlight following data:

1. Top 5 

2. Data >= 80%

I can highlight the top 5 data and show it in text field, but if I want to find specific number >= 80% and show it in text field, how to do it? For example in the attachment, top 11 >= 80%, is there any way to get '11'?

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

You could try like:

=Count({<ITEM={"=Aggr(rangesum(above(Sum(AMT)/Sum(TOTAL AMT),0,rowno()))
		 , (ITEM,(=Sum(AMT), Desc))) <0.8"}>}  ITEM)
  +1
 

View solution in original post

6 Replies
tresesco
MVP
MVP

You could try like:

=Count({<ITEM={"=Aggr(rangesum(above(Sum(AMT)/Sum(TOTAL AMT),0,rowno()))
		 , (ITEM,(=Sum(AMT), Desc))) <0.8"}>}  ITEM)
  +1
 
erichuang
Contributor III
Contributor III
Author

Hi,

Thanks for your reply!

I have tried your suggestion but the result is '1' in text field. Do I miss something?

 

Thanks a lot!

tresesco
MVP
MVP

Have you checked the app I attached? Isn't that working?

erichuang
Contributor III
Contributor III
Author

Hi,

I have checked the attached app and the result in text field also shows '1'.

My qlikview version is 11.20.12904.0 SR12.

Thanks a lot!

tresesco
MVP
MVP

Ohh.. I have used sortable aggr() in the expression and that would work in qv 12+ versions. Smiley Sad

sunny_talwar

For your version of QlikView, you can play around with the idea that was initially proposed here

ABC Analysis in Qlikview