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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Scatter Chart - Calculate total % contribution for top 10 dates/customers

I am trying to build a scatter chart that will show me the relation between 'total % of sales for top 10 dates' and 'total % of sales for top 10 customers'. My example data is as below:

SalesDateProductCustomerSales
15/01/2015A150000
23/02/2015A225000
30/02/2015B35000
05/03/2015C3100000
12/03/2015B120000
30/03/2015D5

453246

04/04/2015C1576556
07/05/2015D3242364

What I need to calculate is as follows:
total % of sales for top 10 dates - calculate %contribution of sales done on top 10 sales date to the overall sales for a given product

total % of sales for top 10 customers - calculate % contribution of sales done with top 10 customers to the overall sales for a given product.


For this I believe my scatter chart dimension must be Product?


I am having difficulties calculating my X and Y field. I am currently using below expressions for X and Y field:

X : sum(aggr(if(rank(aggr(sum(Sales),SalesDate)/sum(TOTAL Sales))<=10,aggr(sum(Sales),SalesDate)/sum(TOTAL Sales)),SalesDate))

Y: sum(aggr(if(rank(aggr(sum(Sales),Customer)/sum(TOTAL Sales))<=10,aggr(sum(Sales),Customer)/sum(TOTAL Sales)),Customer))

However, this doesn't work for me. Moreover, I have the Sales date across years and would like to see the above % contribution for a given year (to the overall sales for the same year). Please advise.

Thanks.

1 Reply
Not applicable
Author

Any suggestions on this?  I am still unable to figure out the X and Y fields.

Thanks,

Ami