Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
Please take reference of the below table, as of now I'm calculating the Previous Quantity using previous function in script which is fetching the previous row value, but required is need to get the previous Quantity based on product like 7LB bag quantity should fall inline with previous 7Lb bag Quantity.
have attached the excel, where column E is Required Output, Column D is existing logic using previous function.
Thanks in Advance.
Regards,
Hi @RaviPuttaswamy5,
you could get it in the load script:
[Sheet1]:
LOAD
[Ticktes],
[Date],
[Quantity],
[Previous Quantity(Current Logic)],
[Required Output(Previous Quantity based on Product)],
[Productname]
FROM [lib://_Descargas_/exercise1.xlsx]
(ooxml, embedded labels, table is Sheet1);
Table1:
LOAD
if(previous(Productname)=[Productname],previous(Quantity),'') as PreviousQTY,
[Ticktes],
[Date],
[Productname]
RESIDENT Sheet1
order by [Productname],[Date] ASC;
Hope it helps;