Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

how do i check if a future value has changed

Fquinn
5 - Atom

Hi,

 

I need to read data and see if a value has changed later on down the file and add it to a new column, i can check if a previous or next row has been modified but would like to check all the rows

 

NameworkerIDDateWorkplace
john doe1Janhome
john doe1Febhome
john doe1Marhome
john doe1Aproffice
mr man2Janhome

 

Expected outcome

NameWorker IDDateWorkplacecurrent workplace
john doe1Janhome office
john doe1Febhome office
john doe1Marhome office
john doe1Aproffice office
mr man2Janhomehome
3 REPLIES 3
FinnCharlton
13 - Pulsar

Hi @Fquinn , here is one way to do this:

FinnCharlton_0-1683285924584.png

  • First we parse the month names into dates to allow sorting.
  • We then sort by Worker ID and Date to ensure the correct order.
  • We then use the Sample tool to take the final row of each Worker. This corresponds to the most recent month.
  • Lastly, we join this back onto the original dataset.

Hope this helps!

PhilipMannering
16 - Nebula
16 - Nebula

As long as the dates are sorted in chronological order you can do,

PhilipMannering_0-1683286060784.png

 

Fquinn
5 - Atom

thanks both, tested with the sample method and works perfectly

 

Labels