Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
fishy
Contributor
Contributor

Show top 5 customers based on sales, and their top 5 items?

Hello! 

I was wondering if anyone can help my with a question. 

I need to show top 5 Customer based on Sales, and also display their 5 most bought Items. 

I've tried putting all 4 columns into a table, with count(item) and sum(Sales) as measures. However, limitation only works with one measure. How can I make my dimension based on two different measures? 

I've tried with If(Rank(Sum([Sales Margin Amount])) <= 5, count(Customer)), but I doesn't limit my top 5 customers. 

Thanks in advance! 

Labels (6)
2 Replies
Anil_Babu_Samineni

Perhaps this?

If(Rank(Sum({<Customer={"=Rank(Sum())<=5"}>} [Sales Margin Amount])) <= 5, count(Customer)) // I assume this is expression, not dimension.

If that is calculated dimension try this

Aggr(If(Rank(Sum({<Customer={"=Rank(Sum())<=5"}>} [Sales Margin Amount])) <= 5, count(Customer)), Customer)

 

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
AkashPatil
Contributor
Contributor

Concate(Distinct If(Aggr(Rank(Sum(Salesammount)),CustomerName)<=5,Aggr(Rank(Sum(Salesammount)),CustomerName) & ' -'  & CustomerName