Using the previous/next N records' data in the current record operation
We all know Alteryx performs its processing one record at a time, but there are some situations where we need to compare an actual value against previous (or next) values of the same field.
The Multi-Row Formula tool allows us to bring more records to the actual calculation, so Alteryx Designer can use previous or next values from the same field in the current data operation.
In this recipe, we’ll be using the Multi-Row Formula tool to fill a series of data, such as the data we get from reading Excel files with merged cells.
Let’s say we have a file that we would see in Excel such as this one:
Figure 3.19: Excel file with merged cells
This is read this way by Alteryx:
Figure 3.20: Alteryx result of reading the previous file
We need to complete the values for City
, Zip
, and Customer Segment
to make this dataset “workable...