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
Highlighted
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.
Anonymous
Not applicable

## 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?

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 206 members 2,197 guests
Recent signins: