Hello!
I'm new to Alteryx and I'm translating some code from ACL Analytics to Alteryx workflows.
Here is the issue:
I need to iterate over a range of dates to perform some tests with given conditions, and I'm pretty confused on how exactly I can do it with iterative macros.
I wrote some piece of code using R just to represent the kind of iteration I need.
library(lubridate)
# User Input
start_date <- ym("201401")
# User Input
end_date <- ym("202009")
# Variables
var_date <- add_with_rollback(start_date,months(-1))
var_date_end <- end_date
# While Loop
while(var_date < var_date_end){
var_date <- add_with_rollback(var_date,months(1))
print(var_date)
}And this is the output:
[1] "2014-01-01"
[1] "2014-02-01"
[1] "2014-03-01"
[1] "2014-04-01"
[1] "2014-05-01"
...
[1] "2020-06-01"
[1] "2020-07-01"
[1] "2020-08-01"
[1] "2020-09-01"
Basically, I just want to guarantee that in each iteration, my tests will be performed considering 201401 first, then 201402, until 202009. Is iterative macro the way? How?
Unfortunately I couldn't find the help I need with Alteryx videos only.
Additionally, I could "almost" find a way using generate row tool, but it would turn my dataset with 7,000,000 lines to a monstrous dataset with 500,000,000+ lines.
Thank you!