Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Fill non - null with existing value

shreya2811
7 - Meteor

Hi All, 

 

A simple question: 

 

Have a column with either 1 value say 23-05-2020 OR  null. Want to replace all null values with this non-null value(23-05-...)

I do not want to hard code it as this value will change as per the new input file. I tried multi row but it doesn't do anything. (code below) , All null values are indeed null(checked through data cleansing). 

 

If isnull([Week Ending]) then [Row-1:Week Ending] else [Week ending] endif

 

Any help is appreciated. thanks!

 

15 REPLIES 15
Luke_C
17 - Castor

Hi @shreya2811 

 

Your formula seems fine, I presume it's not working because the first row in the dataset could be null? One simple thing you could try is sorting the data so the non-null records appear first and fill down in your multi-row formula correctly. One other approach is to use a summarize tool to get the max value and append it back to the main dataset, assuming there is only 1 value you expect to repeat in that column.

shreya2811
7 - Meteor

@Luke_C  hi Luke, thanks for your response. Tried sort and multi row too. This way my all null valued rows are first and then non-null valued rows. Still no luck 

Luke_C
17 - Castor

Hi @shreya2811 

 

Just mocked up a simple example, seems to work fine with your exact formula. Can you take a look at the configs and see if there's a significant difference?

 

Luke_C_0-1623170912210.png

 

 

messi007
15 - Aurora
15 - Aurora

@shreya2811,

 

Please see below

 

if !isnull([Row+1:Week Ending])
  then [Row+1:Week Ending]
elseIf isnull([Week Ending]) 
  then [Row-1:Week Ending] 
else [Week ending] 
endif

 

messi007_0-1623170964112.png

 

Attached the workflow,

Regards

shreya2811
7 - Meteor

Thanks Messi, no luck yet. This is the output I get for those colums: 

 

shreya2811_1-1623171314470.png

 

 

shreya2811_0-1623171286406.png

 

shreya2811
7 - Meteor

Thats so kind thanks Luke, I still get below output , can you share your max option?

 

shreya2811_0-1623171378998.png

 

Luke_C
17 - Castor

Hi @shreya2811  I don't see a sort tool in the screenshot you gave @messi007 take a look at the workflow I attached and try to apply it to yours, otherwise please share a sample of your data.

 

Max option is attached, but multi-row should work.

 

Luke_C_0-1623171756669.png

 

shreya2811
7 - Meteor

Here you go, did sorting as well but still null values

shreya2811_0-1623178432098.png

shreya2811_2-1623178520150.png

 

 

 

 

Luke_C
17 - Castor

Are you grouping by any fields in the multi-row tool? Can you share the configurations?

Labels