Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculate total amount for each product

Hello,

Could you help me to add expression, which calculate total sum for each product group by TYPE.

Please find attached the file.

Thanks,

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Sum(aggr(Count([product ID])*Max(Price),TYPE, [product ID]))

Hope it helps you.

Regards,

Jagan.

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

first expression:

count

(DISTINCT [product ID])

second expression:

sum(Price)

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Sum(aggr(Count([product ID])*Max(Price),TYPE, [product ID]))

Hope it helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

hello Jagan,

Why did you use Max(Price)? I removed Max and it works.

Thanks again,