This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm trying to reproduce the logic that can be done in Excel with just 2 simple formulas.
The table is this
Basically Computed WL is
if not isnull([Measured WL]) then [Measured WL] else [Row-1:Freeboard] endif
And Freeboard is
It's only Semi-Recursive because the input to one row is the output of the previous one. This works in Excel, because Excel ultimately calculates the entire row before proceeding to the next one.
In Alteryx we find ourselves with following situation
This work flow produces this result
Where the Measured WL is null, the Computed WL should be the Freeboard from the row above, like the Excel sheet.
I'm looking for a way to ensure that 2 tools are executed in sequence for each row of data before moving on to the next row
It seems that this "should" be simple to reproduce with built-in tools, but i'm stumped. This may be solved using a macro, but i'm not familiar enough with them to know how to pass in not just the current row, but also the row before.
P.S. I've also attached the workflow(such as it is) and the excel file
Edit: In talking this over with one of my colleagues, i realized that this simple example can be solved by calculating the Freeboard column first. However, in my real world data, there is no single column that can be calculated before all the others. I still need a way to process the 2 tools for each row before proceeding to the next
The original thread went missing. I added your suggestion about the field types and and uploaded a new workflow. The old one had the incorrect field names in the tools and didn't correspond to my description of the problem
Any thoughts on how to fix that?
I Starred your original reply. Did you manage to see it?
Thanks for your reply yesterday. I incorporated your select tool to get the values as doubles.
As I mentioned in the update post
Edit: In talking this over with one of my colleagues, i realized that this simple example can be solved by calculating the Freeboard column first. However, in my real world data, there is no single column that can be calculated before all the others. I still need a way to process the 2 tools for each row before proceeding to the next.
Your work flow does the equivalent by taking the calculation from Freeboard and putting it directly into Computed WL.
Note: I also updated the sample work flow to actually calculate the correct columns in each tool. The one I originally updated was an older version