Hey! I have a question regarding getting my multi-row formula to update in alteryx.
I have attached the macro I'm currently working on! As you can see in the end of the macro I'm trying to update the number of words chosen for the multi-row formula:
Where from the formula: if !isnull([Count]) then REGEX_Replace([Row-1:NewKPI], '(\w+)(\s|-).+', '$1') + " " + GetWord([Row-1:NewKPI], 2) + ' ' +[Field_To_Rename] else [Field_To_Rename] endif
It replaces the 2 in the GetWord.
This is working such that if I choose 1 it says "Revenue For Fisk". However, if I Choose 0 it returns "Revenue Revenue Fisk" or if I choose 2 it returns "Revenue Me Fisk".
Is there a way to make it update such that if I choose 0 it returns "Revenue Fisk", if I choose 1 it returns "Revenue For Fisk" or if I choose 2 it returns "Revenue For Me Fisk"?
Any help is appreciated!
Just seeking more clarification let's say the number selected is 2 would the output be something like below or something else?
Field_To_Rename | RecordID | Count | NewKPI |
Revenue For Me | 1 | Revenue For Me | |
FISK | 2 | 2 | Revenue For Me FISK |
LASK | 3 | 2 | Revenue For Me LASK |
TUN | 4 | 2 | Revenue For Me TUN |
Cost For Me | 5 | Cost For Me | |
FISK | 6 | 2 | Cost For Me FISK |
LASK | 7 | 2 | Cost For Me LASK |
TUN | 8 | 2 | Cost For Me TUN |
Hey!
Yeah I can see it is not really clear. This was the scenarios I was imagining 🙂
Here is my take. You can convert the app to macro by changing input and browse to macro input and macro output.
Workflow:
Hope this helps : )