Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Vendor participation

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

VendorsSalesParticipattion / VendorsParticipation / Store
Jaques1022,2 %66,6 %
Jean1533,3 %50%
Christophe511,1 %33, 3 %
Anne1533,3 %50%

What QlikView gives me :

VendorsSalesParticipattion / VendorsParticipation / Store
Jaques1022,2 %66,6 %
Jean1533,3 %50%
Christophe511,1 %
Anne1533,3 %

Thanks for your help,

Sadjad

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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.

View solution in original post

4 Replies
swuehl
MVP
MVP

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.

JonnyPoole
Employee
Employee

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

Not applicable
Author

Thanks it's working

Not applicable
Author

Thanks