Hello everyone,
I've built a work a workflow that converts my data into 3 groups (high, medium & low).
The flow is attached with some representative data
The problem is that I would need to run this workflow a variable amount of times, so I believe I need to convert my macro to a batch macro, but I'm not sure how.
my original data looks like this (but way more records and way more marketshares)
| respondent | marketshare_1 | marketshare_2 | marketshare_3 |
| 1 | 5 | 20 | 15 |
| 2 | 15 | 25 | 10 |
| 3 | 20 | 10 | 5 |
| 4 | 5 | 25 | 15 |
| 5 | 15 | 20 | 2 |
my macro tries to determine if these values are low, medium or high.
The ideal final outcome would be this (currently it spits out 1/2/3 which I'll convert to L/M/H)
| respondent | marketshare_1 | marketshare_2 | marketshare_3 |
| 1 | L | M | H |
| 2 | M | H | M |
| 3 | H | L | L |
| 4 | L | H | H |
| 5 | M | M | L |
This works fine for one iteration (combination of respondentID & share) , but I want to loop over each combination.
My first call to the macro would be
| respondent | marketshare_1 |
| 1 | 5 |
| 2 | 15 |
| 3 | 20 |
| 4 | 5 |
| 5 | 15 |
and then
| respondent | marketshare_2 |
| 1 | 20 |
| 2 | 25 |
| 3 | 10 |
| 4 | 25 |
| 5 | 20 |
and so on.
Could anyone please help in setting this up?
Thanks in advance!
Mikis