Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
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:
Dimensions:
- Location: is the warehouse where the invoice was delivered
- Article
Expressions:
- 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.
Regards,
Aleix.
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.
Regards,
Maybe, but far easier and better performing will be adding a flag field in the script. See attached example.