This space is for everyone to ask questions related to the Community Platform. It's a space for us to get to know each other and have some fun! Come in and gather around the Water Cooler!
I've got a detailed list of invoices (see attached Excel) and I want to plot (in a simple table) the amount sold in the last invoice.
I've been working with it but I've only been able to show the date oh the last invoice delivered but I didn't succeed with the amount.
In the attached Qlikview file you'll find the following columns:
- Location: is the warehouse where the invoice was delivered
- Month_9 and Month_10: Is the amount sold during these months
- Last Date: Is the date of the last invoice
- Last Invoice: It should calculate the amount of the last invoice
I hope somebody can help me.
Thanks in advance.
Try FirstSortedValue(Amount,-Date). And remove the duplicate records from your data or you'll get no result for two articles.
Thank you very much, it did work.
But, in case there are two or more sales at the same last date then the result is null.
Is it possible to use an expression like : sum(if(Date=max(date), Amount)) ?
Thank you in advance for your help.
Maybe, but far easier and better performing will be adding a flag field in the script. See attached example.