Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Yoy % change with a column of dates and column of values

apaicanada
7 - Meteor

 

Hi,

 

My dataset looks something like this and I'm trying to figure out a formula which would calculate YoY change in these dates.

 

Record

CommodityValueDate

1

Oil8002010-01-01
2Natural Gas7002010-01-01
3Diesel6002010-01-01
4Oil9002010-02-01
5Natural Gas6502010-02-01
6Diesel2002010-02-01

 

For example, if Oil was 800 on 2010-01-01 and 900 on 2011-01-01, then it could give a new column output of 0.111 (which is calculated by (900-800)/900).

 

Any and all help is appreciated, thank you!

1 REPLY 1
OllieClarke
15 - Aurora
15 - Aurora

Assuming that your data has exactly one value per commodity per year, then you could use this workflow:

It orders the data by commodity and year, and then works out the YoY using a multi-row formula grouped by commodity

OllieClarke_0-1572368511738.png

 

Labels