Alteryx Designer Desktop Discussions

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

MULTI-ROW FORMULA

YAN1
Átomo

Hello everyone,

I am a new user for the alteryx. I have a question for the multi-row formula. 

 

these is raw data

tktfirst flt datelast flt date
111111111111120210506EMPTY
1111111111111EMPTYEMPTY
1111111111111EMPTYEMPTY
1111111111111EMPTYEMPTY
1111111111111EMPTY20210601
222222222222220210503EMPTY
2222222222222EMPTYEMPTY
2222222222222EMPTYEMPTY
2222222222222EMPTYEMPTY
2222222222222EMPTY20210530
333333333333320210504EMTPY
3333333333333EMPTYEMTPY
3333333333333EMPTYEMTPY
3333333333333EMPTYEMTPY
3333333333333EMPTYEMTPY
3333333333333EMPTY20210521

 

I use multi-row formula for the first flt date as :

IF [FIRST FLT DATE]="EMPTY" THEN [Row-1:FIRST FLT DATE] ELSE [FIRST FLT DATE] ENDIF and group by tkt.

the last flt date as

:IF [LAST FLT DATE] = "EMPTY" THEN [Row+1:LAST FLT DATE] ELSE [LAST FLT DATE] ENDIF and group by tkt.

 

but there are some problem for the last flt date as follow: the last flt date could not change all empty to the date.

 

tktfirst flt datelast flt date
111111111111120210506EMPTY
111111111111120210506EMPTY
111111111111120210506EMPTY
11111111111112021050620210601
11111111111112021050620210601
222222222222220210503EMPTY
222222222222220210503EMPTY
222222222222220210503EMPTY
22222222222222021050320210530
22222222222222021050320210530
333333333333320210504EMTPY
333333333333320210504EMTPY
333333333333320210504EMTPY
333333333333320210504EMTPY
33333333333332021050420210521
33333333333332021050420210521

 

and I want to get the result as follow :

 

tktfirst flt datelast flt date
11111111111112021050620210601
11111111111112021050620210601
11111111111112021050620210601
11111111111112021050620210601
11111111111112021050620210601

 

would you please give me some advise to solve this problem, thank you.

 

2 RESPUESTAS 2
atcodedog05
22 - Nova
22 - Nova

Hi @YAN1 

 

Here is how you can do it. The best way to fill is up to down.

 

Workflow:

atcodedog05_0-1626936471119.png

 

1. Using record id to set row id.

2. Using multirow formula tool groupby tkt to fill up to down for first flt date.

3. Reversing order using sort.

4.  Using multirow formula tool groupby tkt to fill up to down for last flt date.

 

Note: EMPTY is misspelled as EMTPY in few places 

 

Hope this helps : )

YAN1
Átomo

thank you @atcodedog05

Etiquetas