Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

fill blanks based on the last non-blank cell

Hi all


I have attached the input file I am working with, ultimately I want to fill the blank cells across the columns for each row based on the last non-blank cell value.


The desired output is in tab 'output'. Would I be able to do this at all with a Multi-field tool?


I can do this in VBA very easily I was wondering if AlteryX can do the same (?)


Thanks all!



Yes, you can do it in Alteryx.


The easiest way is to use a Transpose tool to rotate columns to rows. Then you can use a Multi-Row formula tool to fill in the NULLs.


After that, you need to use a Cross Tab tool to rotate it back around. The only complexity is it replaces special characters with an _ so you need to us a Dynamic Rename to restore.



Sample attached.



Thanks jdunkerley79.


I can't seem to open the workflow as my designer is not the latest version however what you suggested is a great way to transform the data.


When I use the multi-row tool it seems it was only able to change one row at a time, as opposed to the 'FOR-NEXT' syntax in Excel VBA. Is there an argument I can use in the expression within the Multi-Row tool (or an option) which enables me to iteratively fill the rows?




Actually please disregard my comment here. Apologies.


It appears if I choose to update existing field then it works across all rows.