Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cost calculation

Hi guys,

I want to calculate Cost of Goods Solds by multily the SalesQty by the AvgCost value per Product depent on the selected period.

For example when the user has select Feb 2014 I have to multiply all quantities per product with the last AvgCost value (the last cost value that the product has in Feb 2014). If he user has select Dec 2014 we have to calculate the Cost of goods Sold based on the last cost value per Product for Dec 2014 multiply by the total SalesQty.

In the attached Sample.qvw everything seems to work fine when I use the Product in the aggr function and as a dimension as well, but when I change the dimension (in the sample I have replace it with SalesPerson) the results are wrong and when you make a selection you get different results!!!!! for example check out the number for SalesPerson 00 and then select only that person in the chart, the number is changing!

In any ways, I need to make this calculation and works under any dimension because I want to use it via a variable.

Please for your help.

Helen

1 Reply
Not applicable
Author

Any idea?