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

Alteryx Designer Desktop Discussions

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

Apply Formula Only If Value In Next Row Is Similar With The Previous ROw Else Leave Empty

Pankaj_G
7 - Meteor

Hi Community,

 

Need some immediate help to get one issue sorted

Pack IdPrice Start DateEnd DateDifference in datesStatus
501-02-202101-02-201901-02-2019TRUE
502-02-201924-02-202024-02-2020TRUE
501-09-2021  FALSE
1801-12-2015  FALSE
1901-12-2015  FALSE
2001-07-202131-08-202131-08-2021TRUE
2001-09-2021  FALSE

 

In the above data set I want to create the column by name "Difference in dates" Its manually created in the above image and I wanna apply Row+1 Formula to create a date in that column after minusing one day from the next row of price start date,Second thing if two rows does not hold the same PACK ID then it should leave the Difference In Dates Cell Blank for that row and it should move on to another row.

 

Exaple in first three row the PackId is same and you can see the Price start date column After Plus 1 row we have got a date "01-02-2019" in Difference In Date Column.

 

It has left the 3rd row blank in DIfferent in Dates column because the Pack ID for the next row is different.please reach out in case of any confusion

3 REPLIES 3
DanM
Alteryx Community Team
Alteryx Community Team

You should be able to use the Multi-Row formula with a combination of selecting the packID to group by and then using a date time difference expression to get the dates. https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Multi-Row-Formula/ta-p...

 

 

Felipe_Ribeir0
16 - Nebula

Hi @Pankaj_G 

 

Please take a look at the attached workflow.

Felipe_Ribeir0_0-1666139171416.png

 

Pankaj_G
7 - Meteor

Appreciate The Efforts And Support Guys, Got What I was Looking For.Thanks to both of you

Labels
Top Solution Authors