Free Trial

Alteryx Designer Desktop Discussions

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

Multi-Row Formula Expression

MarkPitcock
7 - Meteor

I'm struggling to create an expression.

 

Using a multi-Row formula tool the desired result I am looking for is to create new field : DayCount 

 

When SettleDate row match then the day count should be 1 then the next pair 2 then the next pair 3 etc. 

 

Thank you for your time and help 

 

Business DaysSettleDateDayDayCount
312/11/2021Friday1
312/11/2021Friday1
315/11/2021Monday2
315/11/2021Monday2
316/11/2021Tuesday3
316/11/2021Tuesday3
317/11/2021Wednesday4
317/11/2021Wednesday4
318/11/2021Thursday5
318/11/2021Thursday5
2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @MarkPitcock 

 

Here's two ways to do this:

 

  1. Multi-row formula:
    1. The below formula will do the check. I set the value of rows that don't exist as null in the configurations. The first record will be set to 1 based on that, then the rest does the logic you describe.

 

 

if isnull([Row-1:DayCount]) then 1
elseif [Day]=[Row-1:Day] then [Row-1:DayCount]
else [Row-1:DayCount]+1
endif

 

 

.2. Summarize data (or remove dupes), add a record ID, and join back to the original data set. 

Luke_C_0-1636741659041.png

 

MarkPitcock
7 - Meteor

Thank you Luke_C - works like magic

Labels
Top Solution Authors