Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.

I want to fill the below rows with upper rows information by some condition

WuCong
8 - Asteroid

as you can see ,ColC with 0 has values and non-values ,while expect 0 ,with always keep empty .

now we want to fill the data to non-o with 0 's information .

fill the value Group by ColA Col B with Colc C = 0

raw data : 

can we get the expected data by programming ?expected data:

 

2 REPLIES 2
AMiller_Tri
Alteryx Alumni (Retired)

Hi @wu cong? , thank you for your question.

The function you're looking for is the FILL() function. It fills any missing or null values in the specified column with the most recent non-blank value, as determined by the specified window of rows before and after the blank value.

 

You can see the function's documentation here

 

And the solution looks like this:

See that while the original order of the rows changes, the desired output is the same.

  • Grouped by ColA+ColB
  • Sorted by ColC (Sorting by $sourcerownumber would do the trick as well, but I think it's safer to go with ColC)
  • filling all empty\null values in a specified group with the non-empty value that precedes it

 

I've left the 2nd and 3rd parameters of the FILL() function empty, as they're optional and weren't needed for this operation; feel free to read about them either through the function builder in Trifacta itself or via the documentation I've sent.

 

I hope this makes sense; please feel free to ask any additional questions.

 

Thanks,

Amit.

 

Scraven
6 - Meteoroid

 can we see an example please