Hello Gurus,
This is a problem I've come across several times in the past but I've never been able to solve (always found a work around somehow) but I'm throwing in the towel and asking for help this time.
How can I create a macro that will take in all records where a given condition is met. For example, given this data set:
Company | Sale |
ACME | 156 |
Company & Co | 678 |
ACME | 78 |
ACME | 1865 |
Company & Co | 235 |
How can my macro:
So essentially, loop over an undetermined number of [Company] names, and perform calculations X, Y, Z for each
Solved! Go to Solution.
Hey @abovino
My question is....why do you need a macro to do this?
Most of the tools in Alteryx have the ability to group and work with the data at a company level
Part time Tableau, Part Time Alteryx. Full Time Awesome
Hi @LordNeilLord, thanks for the response.
The catch here is that my outputs are CSV files that contain excel formulas which are driven by the recordID (As seen here), and I need a separate file for each customer.
So my original solution was:
Great! I have a file for each customer and all my excel formulas are in place ... Or so I thought. Here is my Alteryx formula to compose an Excel formula:
So this method works fine for the first file that's created but the subsequent files still maintain the Alteryx RecordID in my composed formula. This will be the formula in the first row of the 2nd CSV file:
I don't necessarily need to use a macro to solve this, but perhaps I've been looking at this problem for so long I have tunnel vision.
Hey @abovino
I understand!
Ok, so yeah a batch macro could do the job but it maybe easier to use a multirow formula tool instead. In the attached example I am outputting a spreadsheet per "Category" so in the mutirow I have used the "group by" function to restart at every category.
Part time Tableau, Part Time Alteryx. Full Time Awesome
This worked perfect. I didn't realize you can group by fields using the multi-row formula tool. Thanks!