Discussion Board for collaboration related to QlikView App Development.
In the example attached, I would like to add a fourth column so their value will be the current Quantity minus the Quantity value from the first Purchase for the same Product.
For example for product A, Fx will be Qty - 10 which is the value from the first purchase:
productID dtPurchase Quantity Fx A 01/01/2000 10 0 A 01/02/2000 9 1 A 01/03/2000 8 2
productID dtPurchase Quantity Fx
A 01/01/2000 10 0
A 01/02/2000 9 1
A 01/03/2000 8 2
I know that's very simple for you guys...hope can you help me.
Thanks in advance.
This seems to be working, though I didn't check it particularly carefully:
Quantity-firstsortedvalue(total <productID> Quantity,dtPurchase)
View solution in original post
Try top(Quantity) as you'r expression - it works for me in your example file.
You can of course use top(total Quantity) to take the very first record.
Hope that helps,
Matt - Visual Analytics Ltd
Thank you Matt, but seems the results change when we change the order. I need an expressions that returns always the first Quantity value from the first purchase for each product.
works perfect! thank you John.