Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have the sales data for each salesman that belongs to a store.
I'm trying to get in one table the participation of each vendor all the levels : vendors and store .
I'm using the aggr method to get the total sales for stores : Aggr(sum(SALES),STORE) and I get what I want but the value only appears in one of the vendor lines and not the other.
What I want :
Jaques and Cristophe are in one store and Jean and Anne in another one
Vendors | Sales | Participattion / Vendors | Participation / Store |
---|---|---|---|
Jaques | 10 | 22,2 % | 66,6 % |
Jean | 15 | 33,3 % | 50% |
Christophe | 5 | 11,1 % | 33, 3 % |
Anne | 15 | 33,3 % | 50% |
What QlikView gives me :
Vendors | Sales | Participattion / Vendors | Participation / Store |
---|---|---|---|
Jaques | 10 | 22,2 % | 66,6 % |
Jean | 15 | 33,3 % | 50% |
Christophe | 5 | 11,1 % | |
Anne | 15 | 33,3 % |
Thanks for your help,
Sadjad
Try something like
=sum(Sales) / sum(total Sales)
for Participation / Vendors
and
=sum(Sales) / sum(aggr( sum(total<Store> Sales),Store,Vendors))
or
=sum(Sales) / sum(aggr(NODISTINCT sum(Sales),Store
for Participation / Store.
Try something like
=sum(Sales) / sum(total Sales)
for Participation / Vendors
and
=sum(Sales) / sum(aggr( sum(total<Store> Sales),Store,Vendors))
or
=sum(Sales) / sum(aggr(NODISTINCT sum(Sales),Store
for Participation / Store.
I put in a nodistinct arguement in the aggr function to get all the values to return. Here is the expression:
sum(Sales)/ sum( aggr( noDISTINCT sum(Sales),Store))
i included it in the attached QVW
Thanks it's working
Thanks