Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

How to register a value using data from different dates

Highlighted
6 - Meteoroid

I have a column indicating whether to buy, sell or hold a stock on a particular day.  There is also a date column indicating the change in the stock price by day.  So if I sold the stock on 2016 03 01, and the price of the stock went down on 2016 03 02, I want to register "Win" in a new column (Or "Loss") if the stock price went up on 2016 03 02.  Attached is a sample data set.  Column D is the new column I am trying to add.  How can I do this in Alteryx?

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @abradle4 

 

Is this what you want? 

 

Change_Stock.PNG

 

WF appended.

 

Cheers,

Highlighted
6 - Meteoroid

Thank you!  I am not understanding if the statement accounts for the fact that the change in stock price needs to be referencing the next day's change in stock price (vs. the same day's change in stock price).  If we sold on March 1, we need to be looking at the stock price change on March 2 to understand it it is a win or loss.  

Having said that, would you recommend an update to the statement?

Thank you!!!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@abradle4 

 

If it's a comparison with the next day, would this be a good idea?

 

ChangeStoc.PNG

 

Cheers,

Highlighted
6 - Meteoroid

Yes, this worked!  Thank you so much!

Labels