Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ivanalejandroro
Contributor
Contributor

How can I get a stock with average costs?

Hi

I need to get a stock with next data:

PartNumTranTypeTranDateTranQtyUMMtlUnitCost
363509-101-50PLT-STK15/03/20186PZA183.56
363509-101-50STK-MTL13/07/2018-1PZA183.56
363509-101-50ADJ-QTY16/08/2018-2PZA183.56
363509-101-50STK-MTL29/08/2018-1PZA183.56
363509-101-50STK-MTL31/08/2018-1PZA183.56
363509-101-50STK-MTL11/09/2018-1PZA183.56
363509-101-50PLT-STK14/09/20186PZA185.34
363509-101-50STK-MTL14/09/2018-1PZA185.34
363509-101-50STK-MTL08/10/2018-1PZA185.34
363509-101-50STK-MTL10/10/2018-1PZA185.34
363509-101-50STK-MTL24/10/2018-1PZA185.34
363509-101-50STK-MTL01/11/2018-1PZA185.34
363509-101-50ADJ-QTY17/12/2018-6PZA191.34
363509-101-50PLT-STK17/12/201818PZA191.67
363509-101-50STK-MTL16/01/2019-1PZA191.34
363509-101-50STK-MTL25/01/2019-1PZA191.34
363509-101-50STK-MTL17/02/2019-1PZA191.34
363509-101-50STK-MTL07/05/2019-2PZA191.34
363509-101-50STK-MTL11/07/2019-1PZA191.34
363509-101-50STK-MTL16/08/2019-1PZA191.34
363509-101-50STK-MTL30/09/2019-2PZA191.34
363509-101-50PLT-STK08/10/20196PZA189.82
363509-101-50STK-MTL21/10/2019-1PZA190.43
363509-101-50STK-MTL20/11/2019-2PZA190.43
363509-101-50STK-MTL21/01/2020-2PZA190.43
363509-101-50STK-MTL24/02/2020-3PZA190.43

 

The first movement of this part was on 15/03/2018. The entry of the piece was for 6 units, then, if I wanted to issue the inventory to January 2020 the result would be 5 units, and the unit cost 190.43.

How can I get this data on a table?

 

2 Replies
Wlad_Masi
Employee
Employee

Hi @ivanalejandroro I could not understand your example.
Do you want the average value for MtlUnitCost field or for TranQty?


To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
ivanalejandroro
Contributor
Contributor
Author

Hi @Wlad_Masi  I need to get the stock for  TranQty with the last cost.

For example, 2018 September:

Qty = 3

Unit Cost = 579.01

Stock =  1,737.03