Hi all,
I'm trying to calculate the year over year change in a stock price for every date / row.
In excel, this was much easier because I would:
- Sort the tickers alphabetically
- Verify if there was a stock price from the price year (e.g., offset 1 year)
- Calculate the variance
The current table has millions of rows and many stock prices
I am trying to create a column that shows the yoy change in closing price for any particular ticker on each date:
(Dec. 30 2016 closing price - Dec. 30 2015 closing price) / Dec. 30 2016 closing price for each stock
I'm very new to BI. Below was my attempt at a measure...but has not been successful
YOY Difference = Calculate(sum('nasdaq_prices_2006-2015'[Closingprice]),dateadd('nasdaq_prices_2006-2015'[Date],-1,year))
Any help would be greatly appreciated!