Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dusasuman
Creator
Creator

Top Customers

Hi Community,

I need to show customers count in a text object where the sales of customers is more than overall avg sales per customers.

Also need to show the same customers list in a table with their sales..

Please help me with solution

1 Solution

Accepted Solutions
tresesco
MVP
MVP

PFA

Expression in chart :

=Sum(if(Aggr(Sum(Sales),Cust)>Aggr(Avg(TOTAL Aggr(Sum(Sales),Cust)),Cust),Sales))


Expression in text box:


=Concat(if(Aggr(Sum(Sales),Cust)>Aggr(Avg(TOTAL Aggr(Sum(Sales),Cust)),Cust),Cust), ',' )

View solution in original post

11 Replies
tresesco
MVP
MVP

Could help us providing a sample qvw to work with and explain your expected output against your data sample?

dusasuman
Creator
Creator
Author

Please look at sample data

Anonymous
Not applicable

=Sum(if(Aggr(Sum(Sales),Cust)>Aggr(Avg(TOTAL Aggr(Sum(Sales),Cust)),Cust),1))

shiveshsingh
Master
Master

Hi Suman

Please create one variable as vAVG = SUM(Sales)/Count(Cust)

Text box SET analysis.

=Count({<Sales={'>=$(=vAVG)'}>}Cust)

tresesco
MVP
MVP

PFA

Expression in chart :

=Sum(if(Aggr(Sum(Sales),Cust)>Aggr(Avg(TOTAL Aggr(Sum(Sales),Cust)),Cust),Sales))


Expression in text box:


=Concat(if(Aggr(Sum(Sales),Cust)>Aggr(Avg(TOTAL Aggr(Sum(Sales),Cust)),Cust),Cust), ',' )

Anonymous
Not applicable

... this solutions is not weighted by customer... we don't know what Suman needs exactly...

dusasuman
Creator
Creator
Author

Thanks for your reply,

I have attached the sample file with source data and out put needed. Please find the attachment.. Output sheet is the desired requirement

Anonymous
Not applicable

did you have a look at the solutions above?!?

dusasuman
Creator
Creator
Author

Yes Just looked in to it, Your solution is correct.. Appreciate your help .. Thanks!!