Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Replicating a For Each loop in Alteryx?

Bnstates
7 - Meteor

I'm fairly new to Alteryx and I'm trying to find a way to replicate a for each loop. I have data that I need to average the volumes of, but it has to be contingent on the as-of date. I'm looking for something that could help me do something similar to the following:

 

For Each As-Of-Date

If data = 1 then Average(volume)

ElseIf data = 2 then Average(Volume)

...

End If

Next As-Of_Date

 

Any help is greatly appreciated!

2 REPLIES 2
john_miller9
11 - Bolide

Looping in Alteryx is generally handled by using a macro.  However, from what you've provided it looks like this could be accomplished using a summarize tool configured as follows:

 

Group By: [As-of-Date]

Group By: [data]

Average: [Volume]

 

 

But it really depends on what your data looks like and the result you're looking to get.  Can you post a sample of the data?

Bnstates
7 - Meteor

It would be difficult to post a sample of the data, as it's a very large dataset and the data is confidential. However, a summarize might actually do the job, so I'll try that when I get to that step, this was more of a preparatory question. If that doesn't work, I'll make sure to provide a whip up a quick sample if I need to ask again. Thanks!

Labels