Discussion Board for collaboration related to QlikView App Development.
Mi client asked me to have his inventory valued at any give date.
My inventory movements table looks like this
So, in case there is no movement at a particular date, I have to take the Avg. Price from de first previous movement.
1.- I haven't solved it in script because preformance issues could appear (lots of warehouses, Items and too much gaps beetwen movement dates).
2.- I'm using (and it's working fine) this expression (Simplified):
Sum(Qty) * Bottom(Aggr(Sum(AvgPrice),Warehouse,ItemCode,Year,Month,Day))
¿Do you think there is a better solution than this one in order to improve performance?
Thanks for your help guys.
Go to Solution.
I'd still fix it in the script. It's easier and will result in better performance of the front end.
LOAD * FROM ...source... ;
Wharehouse as Warehouse,
alt([Avg. Price], if(previous(ItemCode)=ItemCode, peek('Avg. Price'))) as [Avg. Price]
ORDER BY ItemCode, Year, Month, Day;
DROP TABLE Temp;
View solution in original post
Thanks for your reply.
Do you think it would work better even with more tha 30 million rows? (Sorry I'm not very good at testing performance)
Yes. Millions of rows will hurt performance much worse in the front end.