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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr function

Hello everyone,

I have a problem when i'm using the aggr function.

I have the number of sales per store(DEALER_NAME):

sales_dealer.JPG.jpg

i'm using the following expression : = count({1} SALES)

Each store has salesman and I'm trying to get the participation of each salesman in their stores.

I'm using : =count(SALES)/sum(Aggr(NODISTINCT count({1}>} SALES),DEALER_NAME)

but for the store 4, I get some weird results.

So I put the following expression in a text object :

=SUM(Aggr(NODISTINCT count({1< DEALER_NAME =  {'Store 4'}>} SALES),DEALER_NAME))

and it gives me 62469 as a result and I don't understand why.

Anyone has a clue ?

Thanks for your help

Sadjad

1 Solution

Accepted Solutions
Not applicable
Author

     Thanks guys but finally the problem was in the data.

View solution in original post

4 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Can you attach sample data and file, it helps in understanding easily.  I think count(SALES) is enough to get the number of Sales per Dealer since dealer is used as dimension.

Regards,

Jagan.

Not applicable
Author

Hi Sadjad,

Hope the below expression helps!

=count(SALES)/count({1} total SALES)

--

Vinoth

Not applicable
Author

try this

=count(SALES)/count(All  SALES)

or this one

=count(SALES)/sum({1} count(SALES))

Not applicable
Author

     Thanks guys but finally the problem was in the data.