Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MRitter
Employee
Employee

Bar Chart Where each bar shows the Top N Customers Sales

This seems that it would be a fairly common requirement.  But I can't find any examples.

What I want to end up with is a bar for each quarter.  Each bar represents the total sales from the top 100 customers in that quarter.  The Top 100 customers will change from quarter to quarter.

I have tried many versions of expressions and nothing works when displaying all quarters in the bar chart.  I only get the correct total when I filter on a single quarter.  It seems like it is unable to determine the Top 100 customers per quarter.

Any ideas would be greatly appreciated.  Even a totally different approach like maybe assigning the rank per quarter in the load script.

Thanks

3 Replies
Claudiu_Anghelescu
Specialist
Specialist

Try using ValueList()

To help community find solutions, please don't forget to mark as correct.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would think something like:

if(rank(sum(Sales) <= 100, Sum(Sales))

-Rob

MRitter
Employee
Employee
Author

Thanks Rob.  I think this would assume that the dimension is customer.  In my case the dimension is quarter and I want the top 100 customers for each quarter.