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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Eston_Sello
Contributor III
Contributor III

Summing up values

Good day,

Please assist I am using the below formula to get the total sales by agent .

=sum(aggr(Total max([WF Sales]),Agent))

How do I sum up the results that I get from this formula because it works fine when I make a selection for one day but more than one day I get incorrect number.

 

Labels (1)
1 Solution

Accepted Solutions
Eston_Sello
Contributor III
Contributor III
Author

I have included day on my expression and it solved my problem.

=sum(aggr(max([WF Sales]),Day, Agent))

View solution in original post

11 Replies
agigliotti
MVP
MVP

maybe this:
=sum( aggr( sum([WF Sales]), Agent ) )

I hope it can helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Eston_Sello
Contributor III
Contributor III
Author

Hi 

Thanks for the quick respond, sum gives me a very big number but max works fine but only for one day not for the whole month and I want to see sales made by agent for the whole month.

=sum(aggr(Max([WF Sales]),Agent))

agigliotti
MVP
MVP

your expression gives you the sum of maximum sales for each agent.
is this really what you need?
why are you talking about "only for one day" ?
are you using some filters?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Eston_Sello
Contributor III
Contributor III
Author

Yes i'm using date filters on the front end.

E.g

Sales for the 1st of March = 800
Sales for the 2nd of March = 650
And when I select the 1st and 2nd at the same time I get = 899 instead of  1450 that's why I say it works fine only for one day. 

agigliotti
MVP
MVP

could you share a sample app to look at?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Eston_Sello
Contributor III
Contributor III
Author

Please see the below.

Eston_Sello_0-1588859426164.png

 

Eston_Sello
Contributor III
Contributor III
Author

Someone advise me to do the below but I am not exactly sure how to do it.

''For this to work you would have to get max per day per agent and sum the result. Then aggregate the agents for a team leader''

agigliotti
MVP
MVP

it still not clear to me what you looking for.
could you attach a sample app with mock data?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Eston_Sello
Contributor III
Contributor III
Author

Please find the attached.