There is no current link between the Item and the cost.
In the main document for the ILE quantity we split them out.
ItemLedgerEntry:
LOAD NAVcoile,
EntryID,
ItemIDile,
Key_ItemID,
Key_Cost,
[Posting Date] as Date,
[Posting Date],
[Entry Type],
LocCode,
Key_LocCode,
Quantity,
[Remaining Quantity],
if((Now()-[Posting Date])<=180,([Remaining Quantity])) AS Current_QTY,
if((Now()-[Posting Date])>180,([Remaining Quantity])) AS Aged_QTY,
Open,
[Global Dimension 1 Code],
[Global Dimension 2 Code],
NAVCoSO
FROM
[QVD\ILE.qvd]
(qvd);
We then did the calculation in the cart. =[Current Value LCY]/[Current Stock Qty]*SUM([Current_QTY])
This works fine for that chart.
If we then want to just do a staked bar chart with CO as the bottom axis the original calculation doesn't work because it is calculated at the country level and not the item level.