Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Adding days

MaPerez
7 - Meteor

Greetings,

 

I have the same problem. I want to create a new column where I add a day if the products change. For example

 


11.jpg

 

I need this

 

22.jpg

 

I was using the multi-row formula with datetimeadd(max_Date,1,"days") but I don't get the correct result. 

 

Thanks for your help!!

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@MaPerez,

 

Here's a quick picture of the configuration that you're looking for:

 

capture.png

 

Notice that there is a GROUP configuration by PRODUCT!

 

IIF([Product]!=[Row-1:Product],DateTimeAdd([Max_Date],1,"Days"),DateTimeAdd([Row-1:New_Date],1,"Days"))

If the product on the row isn't the same as the product above it, then add 1 day to the Max_Date.  Otherwise add one date to the prior result.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Kenda
16 - Nebula
16 - Nebula

Hey @MaPerez!

 

To solve this, I first created an ID field using a Multi-Row Formula Tool and grouping by Product.

adding days 1.PNG

 

 

I then added a second Multi-Row Formula tool to check if the ID is 1 - if so, add one day to the max date, otherwise add one day to the new date in the row above. Also group by product here.

adding days 2.PNG

 

 

Hope this helps!

MaPerez
7 - Meteor

Thank you so much for your help!!!! I'm quite new with Alteryx :D

MaPerez
7 - Meteor

Thank you so much for your help!!!!!

Labels