community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Adding days

Highlighted
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!!

Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Pulsar
Pulsar

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!

Meteor

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

Meteor

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

Labels