Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mariozubieta
Contributor III
Contributor III

Limit Table Rows

Hello,

I was wondering if anyone knows a way, to build a table that would show 3 Rows for every category, based on max amount.

For example, I have 3 category of products, and each category has hundreds of transactions. I need to have a table, with 9 rows, that has the top 10 transactions for each category, order up by Category and then amount.

Here is what I would like to have as a result.

Not that there are plently of ID for each transaction, but I only want to show the 3 with largest amounts.

IDCategoryAmount
32

AA

$4,567
123AA$2,345
232AA$1,234
2345345BB$5,356
6563BB$5,123
123234BB$4,956
6577CC$3,432
34432CC$2,456
423CC$2,345

Any idea is appreciated.

thanks,

6 Replies
vishsaggi
Champion III
Champion III

Did you try using Straight table dimension limits tab and check show largest 3. ?

Capture.PNG

sergio0592
Specialist III
Specialist III

Hi,

Maybe you can try with :

=sum({<Id={“=rank (TOTAL <Category> Amount)<=3”}>} Amount)

mariozubieta
Contributor III
Contributor III
Author

This will only bring the 3 biggest, no mater the category

mariozubieta
Contributor III
Contributor III
Author

I tried this, and might need something different on the formula since this didn't work, but I will dig a bit more into this solution, it seams to go on the right direction. thanks for the answer

=sum({<Id={“=rank (TOTAL <Category> Amount)<=3”}>} Amount)

Anil_Babu_Samineni

May be this as Calculated Dimension?

If(Aggr(Rank(Sum(Amount))<=10, Category), Category)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
devarasu07
Master II
Master II

Hi,

How about this pagination concept.

Paging Implementation for Straight table