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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
MRitter
Employee
Employee

Bar Chart Issue

I want to display the following in a bar chart:

Total sales for the TopN (will use a variable to control this) customers by quarter.

I have tried the following expression and it works fine if I select a single quarter.  But when I display all quarters the totals are not correct.

=aggr(Sum({<[End Customer Global Ultimate ID] = {"=Rank(Sum([Product Bookings Ttl]))<=100"}>} [Product Bookings Ttl]),[Fiscal Quarter ID])

2 Replies
Vegar
MVP
MVP

Do you need the aggr()? If not then try

=Sum({<[End Customer Global Ultimate ID] = {"=Rank(Sum([Product Bookings Ttl]))<=100"}>} [Product Bookings Ttl])

If you do need it then you might want to put a sum around the lot like this:

=Sum(aggr(Sum({<[End Customer Global Ultimate ID] = {"=Rank(Sum([Product Bookings Ttl]))<=100"}>} [Product Bookings Ttl]),[Fiscal Quarter ID]))

MRitter
Employee
Employee
Author

Neither one is working.

I have a straight table which shows the Top 100 customers for a quarter and the total is 487,373

In the bar chart if I filter on just this quarter I get the same amount.  However, with no filter the total for this quarter is only 340,347.  All quarters are off.

 

What I ultimately want is for the bar chart to show the total sales for the Top 100 customers in that quarter.