Hi,
I am currently struggling with trying to calculate Inflation between two periods as it is not the true value. I have attached an example model with details explaining what needs to be achieved in more depth.
Here is the short of it:
A user would select two Periods/Dates so that we have a min date and a max date. So for example period 1 = Month 1 which contains Products 1,2 & 3. This would be the minimum Period. Period 2 = Month 2 which contains Products 1,2,4. which would be our max period.
So for Period 1 we sum Quantity which would be:
Product 1 Qty 10
Product 2 Qty 15
Product 3 Qty 10
Total = 35.
Period 2 we sum Quantity which would be
Product 1 Qty 20
Product 2 Qty 10
Product 4 Qty 20
Total = 50
Therefore the Inflation calculation would be
((Period 2 - Period 1) / Period 2)
= ((50-35)/50)
= 30%
But this is not the True inflation as its comparing apples with oranges. In order to get the true inflation one would need to calculate the inflation only where products exist in both periods.
Therefore the true inflation would be to:
((Sum(period 2) for Product 1 & 2 - Sum(Period 1) for Product 1 & 2) / Sum(Period2) for Product 1&2)
= ((30 - 25) / 30)
=16.67%
As now you are comparing Inflation grouped by product. Please advise how this can be done in Qlikview