We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Fill Down then fix first null row above fill down.

hellyars
13 - Pulsar

 

 

Brain fried from death by PowerPoint day.  I can't remember how to do this. 

 

The field is [LN].  LN is a string.

I know how to fill down from 16 using the Multi-Tool and the following expression

 

 

if isnull([TEST_LN]) then [Row-1:TEST_LN] 
else [TEST_LN] 
endif 

 

 

But this will leave the row above 16 still as [Null].   

Without adding another Multi-Row Tool, how can I make this 15.  

 

 

TEST_LN
[Null]
16
[Null]
[Null]
[Null]
[Null]
17

[Null]

[Null]

18

[Null]

[Null]

[Null]

19

[Null]

[Null]

[Null]

[Null]

20

4 REPLIES 4
FrederikE
13 - Pulsar

Hey @hellyars,

 

I think this should do. 

 

if isnull([TEST_LN]) AND !IsNull([Row-1:TEST_LN])

then [Row-1:TEST_LN]

Elseif isnull([TEST_LN])

then [Row+1:TEST_LN]-1
else [TEST_LN]
endif

hellyars
13 - Pulsar

@FrederikE 

Thanks, but that didn't really work.  LN is a String.   So it errors. 

I tried to wrap the 4th line in toString(toNumber()) = No joy.

I tried converting LN to a number before the Multi-Role Tool and using your example = No Joy the first line is 0 instead of 15.

FrederikE
13 - Pulsar

Hey @hellyars,

 

I see. That one should work for a string aswell. 

 

if isnull([TEST_LN]) AND !IsNull([Row-1:TEST_LN])
then [Row-1:TEST_LN]
elseif isNull(TEST_LN)
THEN ToString(ToNumber([Row+1:TEST_LN])-1)
else [TEST_LN]
endif

 

FrederikE_0-1687470381785.png

 

hellyars
13 - Pulsar

@FrederikE 

Ah. I found the problem.  I had Values for Rows that don't Exist set to 0 instead of NULL.  

That fixed it and now your expression works. (second with the ToString(ToNumber())

THANKS.

Labels
Top Solution Authors