Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pkpandey
Contributor III
Contributor III

Problem with aggregate function

Hi All

I have a problem with AGGREGATE function. I am getting the GP value wrong when an item is selected. For example when an item a is selected the GP value should be 2571.429 but it is showing 9000.

Please find the attached QVW for your information.

1 Solution

Accepted Solutions
sunny_talwar

Or this:

=Sum(Total {1} GP)/Sum(Total {1} Sales) * Sum(Sales)

View solution in original post

5 Replies
sunny_talwar

What is the logic behind getting 2571.429 here?

pkpandey
Contributor III
Contributor III
Author

Hi Sunny

Total GP for the month divided by total sales for the month and multiplied by the sales of that Item for the month

sunny_talwar

Try this expression. You overally complicated your expression before

=Sum(Total {<Item>} GP)/Sum(Total {<Item>} Sales) * Sum(Sales)


Capture.PNG

sunny_talwar

Or this:

=Sum(Total {1} GP)/Sum(Total {1} Sales) * Sum(Sales)

pkpandey
Contributor III
Contributor III
Author

Many thanks