cancel
Showing results for
Did you mean:
Frequent Visitor

## Calculating Commodity price index

Hi,

I have 10 year data on couple of commodities and I am trying to create index for each commodity using 1/1/2009 price as base = 100 and then calculating subesquent month index as (100*Current Price/Base year Price).

where base year price refers to 1/1/2009 price

.

I tried to create a measure first using the LOOKUPVALUE to return 1/1/2009 price and use it in formula - did not work

Then, I tried to use the % change column

Thermal coal index = IF(Commodities[Month]>1/1/2009,EARLIER(Commodities[ThermalCoal.Change])*(1+Commodities[ThermalCoal.Change]) - but Earlier function doesn't work

2 REPLIES 2
Community Support Team

## Re: Calculating Commodity price index

Hi @RobinNandal,

Firstly, I'm afraid that you use EARLIER function incorrectly.

You could have a reference of this blogabout how to use it.

In addition, if you want to calculate the price of 2009/1/1, you could use the formula like below.

```price for 2009-1-1 =
CALCULATE (
SUM ( 'table'[price] ),
FILTER ( ALL ( 'table' ), 'table'[date] = "2009/1/1" )
)
```

If you still need help, please share some data sample which could reproduce your scenario and your desired output so that we can help further on it.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

## Re: Calculating Commodity price index

Did you have any luck?? How you solved it.

Im trying to calculate a product price index as well. In my case a Avg. Rolling 12 month measure versus the Avg. Rolling 12 Month price 2 years ago.

I having big problems with setting a dinamic denominator for this formula. it has to consider the actual Avg.12RM let say Dec 2018, and compare it versus the Avg.12RM price of January 2016.

So the formula would be ("like") = (100) * ( Avg.R12M Dec 2018 price  / AvR12M January 2016*), but at the same time being dynamic as next month 2019" it would move the denominator 1 year to become Avg.R12M January 2017.

Any help or suggestions?