Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Sum for each number expression

I'm trying to get a total sum of the total price column but I have some duplicate fields and only want to pick up one 'Total Price' amount per 'Invoice Number'. For instance, for invoice number 14735 there are 3 different fields with the value 1064.4 but I only want to use one of them in the sum expression.

Any ideas as to what expression I could use?

Thanks

expression.PNG

1 Solution

Accepted Solutions
jonathandienst

This should do it:

=Sum(Aggr(Only([Total Price]), [Invoice Number]))

I suggest that you re-examine the data model to create a table in which these amounts are not duplicted and possibly amend the model/front end so that you are not making spurious duplicates from incorrectlty associated dimensions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
qlikview979
Specialist
Specialist

Hi please share sample app

jonathandienst

This should do it:

=Sum(Aggr(Only([Total Price]), [Invoice Number]))

I suggest that you re-examine the data model to create a table in which these amounts are not duplicted and possibly amend the model/front end so that you are not making spurious duplicates from incorrectlty associated dimensions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

khaycock
Creator
Creator
Author

Here is one. Thanks.