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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
andrea90casa
Creator
Creator

Expression Problem

Hi at all

I have this situation

So in the first table i calc the total quantity of purchased materials, first available unit price  and then the total amount oof purchased for each product. Then i woul like to obtain a second table with only the total amount by "Bill".

For example in the example i would like obtain 2515 as total amount of "Conto_01" and not 2775.

I used this function

Total Quantity =      sum(Quantity)

First Price =           Avg({<First_Price = {1}>}Price)

Total Amount =      sum(Quantity) * Avg({<First_Price = {1}>}Price)

Is it possible to obtain the target result?

Andrea

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum(Aggr(Sum(Quantity) * Avg({<First_Price = {1}>}Price), Bill, Product))

View solution in original post

1 Reply
sunny_talwar

Try this

Sum(Aggr(Sum(Quantity) * Avg({<First_Price = {1}>}Price), Bill, Product))