Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
desertmatt
Contributor III
Contributor III

Need quantity per product for latest (Max(DelDate)) delivery but Aggr gives results only for first Row (despite Nodistinct)

Hello All,

need your help please.

Checked already all relevant posts here for similar issues (also HICs guidelines on Aggr etc.) but can't get this to work 😞

I just need the total quantities for each product for the latest delivery date

desertmatt_0-1660292507766.png

Data Excel and qvw attached - would appreciate if somebody could point me in the right direction please.

Thank you very much

Matt

Labels (2)
1 Solution

Accepted Solutions
desertmatt
Contributor III
Contributor III
Author

Ok All good - I kept searching and found this solution from Sunny:

https://community.qlik.com/t5/QlikView-App-Dev/Sum-of-multiple-values-per-max-aggr-date/td-p/1547742

which I converted to this:

=Sum(Aggr(if(DelDate= Max(TOTAL <Product> DelDate),Sum (Pcs)),Product,DelDate))

Thank you all who looked at this

View solution in original post

1 Reply
desertmatt
Contributor III
Contributor III
Author

Ok All good - I kept searching and found this solution from Sunny:

https://community.qlik.com/t5/QlikView-App-Dev/Sum-of-multiple-values-per-max-aggr-date/td-p/1547742

which I converted to this:

=Sum(Aggr(if(DelDate= Max(TOTAL <Product> DelDate),Sum (Pcs)),Product,DelDate))

Thank you all who looked at this