Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
16 - Nebula
16 - Nebula

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
Top Solution Authors