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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Support on the aggr functions and calculate

I have a data source link this:

//Inventory_info:

Date

ItemName

Qty

Factory

//Price: (one ItemName may included several price, so used the average price to calculate)

ItemName

Price

I want to creat a trend chart for inventory value in different days, so i used the calculation as:

sum( aggr(sum(Qty),ItemName)*aggr(Price,ItemName)  )

can not achieve this, so how should i work on that? Any ideas?

4 Replies
Not applicable
Author

sum(aggr(sum(Qty),ItemName)*aggr(avg(Price),ItemName)) might work.You need to have a group function for aggr to work.

Hope this helps,

Kiran

Not applicable
Author

sorry, this way i have test but donot work.

can somebody help to analysis this again?

thank you

Not applicable
Author

Just try out sum(aggr(sum(Qty)*avg(price),ItemName))

Regards,

Kiran.

Not applicable
Author

thank you but still not work.

I have upload the sample data and my qlikview file, if possible you can check in it.

the name of it: how to use aggr function to build a trend chart