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: 
tellmalaika17
Contributor II
Contributor II

Pivot table to show top 20 rows

Hey All,

I am trying to getting top 20 rows in pivot table but it is not working for me. Just a brief background on the requirement :

1. Columns to have Traders and Rows to have CP hence using Traders and CP as dimension.

2. Color coding based on 20%, 30% and 50%

3 Have list of 50 traders in the database but need to show only default 10 traders with a trader filter for adding more traders (incase required). So the dashboard will just show 10 traders by default

Steps :

1. Create a variable(vdefaulttraders) to show only 10 traders. Get selectedcount>0 Traders ='Trdr1',Trdr2'  & concat & Trader, 'Trdr1','Trdr2' so on...

2. Dimension CP and Traders

3. Expression - sum({<Trader={$(vDefaulttraders)}>}Value)

Everything worked till the percentage coding but i am unable to show top 20 rows even after using aggr, rank in the expression. If i use aggr(rank(sum.....) in dimension it shows top 20 but the % percentage nos messes up becoz the denominatore is based on top 20 transactions instead of total of all transactions.

Any help in this regard will be highly appreciates. I need to fix this at the earliest hence reply asap.

Thanks

PS: Cannot send the qvw file

1 Reply
vinieme12
Champion III
Champion III

Can you post the exact calculated dimension expression and other expressions in the table?

You want to show a fixed list of 10 traders? or should the rank be evaluated on some metric?

If you specify your traders in set expression how would it be dynamic??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.