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: 
Not applicable

Sum of Top 10 Trading Groups with multiple expressions in table chart

I am trying to create a chart where I want the sum of all the 'Top 10 Trading Groups' and to use this as a dimension along with a date field

I then have five expressions such as sum(Sales), sum(supply), etc.... which i want to drive from 'Top 10 Trading Groups'

I have tried the following but does not work.

=sum(aggr(if(rank(aggr(sum(NET_SALE), TRADING_GROUP, ISSUE_DATE))<=10, SUM(NET_SALE)), ISSUE_DATE, TRADING_GROUP))

And then I would like to get all the sales EXCLUDING the Top 10.

Can anyone help?

2 Replies
Not applicable
Author

Try this in the Expression

=If(aggr(rank(aggr(sum([NET_SALE]),[TRADING_GROUP],[ISSUE_DATE]),0,1),[NET_SALE])<=10,

sum(NET_SALE)

, Null)

Not applicable
Author

Thanks