Loops in Alteryx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I am trying to solve a problem where I want this input
to be converted to this output
The logic behind this should be - Loop through the data and check where Value = 0, If Value = 0 check if previous row is 1 and if this condition is True (extract the Timestamp Value for the Value = 0), Now look for Value = 1 afterwards, as soon as we get 1, extract the timestamp value for that (Final Timestamp). If the sequence is 1, 0, 1 - it's easy but what if there are 100 zeros between 2 1s. So we basically have to make Groups of these kind of patterns (type 1 : 1, 0, 1 and in other cases, it should be 1, 0, 0,1 or 1,0,0,0,0,0,1 and so on) and then fetch minimum and maximum timestamp for each group. Please suggest me the best solution. It could be direct or through Iterative Macros.
Thanks in advance!!!
Solved! Go to Solution.
- Labels:
- Batch Macro
- Iterative Macro
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much!!! I really appreciate your quick response.
![](/skins/images/9AF25434D4F136B28264A96CA92E8A93/responsive_peak/images/icon_anonymous_message.png)