Hello guys,
Could you please help me with this?
Let's say I have an Excel table like this:
Date | Tea | Coffee |
2020M11 | 36 | 11 |
2020M12 | 33 | 16 |
And I would like to create a txt output file that would look this way:
START_SERIES;
NAME: Tea;
DATE: 2020M11 # VALUE: 36
DATE: 2020M12 # VALUE: 33
END_SERIES;
START_SERIES;
NAME: Coffee;
DATE: 2020M11 # VALUE: 11
DATE: 2020M12 # VALUE: 16
END_SERIES;
Is it possible with Alteryx?
Thank you!
Solved! Go to Solution.
Hello @Stanislaw ,
I've created a little batch macro that does the job 🙂
If you need anything else let me know
Regards
That's intense. 🙂
I'd need to spend some time to understand every step of this process, but now I have something to work with.
Thank you, afv2688, you rock!
Can this batch macro be run via Command Prompt in Windows? Or do I have to have Alteryx Designer opened?
Best,
S.
Hello @Stanislaw ,
depending on your configuration you may be able to run your workflows using the command prompt on windows yes.
Using the following command you would be able to test it:
"C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" "C:\yourworkflowpath\yourworkflow.yxmd"
To help you understand it, this workflow uses a batch macro to create the results. Using the input it will take all the names and filter to get the data corresponding to this specific product.
Then, file will be set up using your specifications (first start, then product, the dates and in the end the ending row)
Once it finishes it piles up every result it gets on the output, giving you everything together as desired.
On the output file I have selected '\0' since I don't want alteryx to set any delimeters for the csv file.
Hope this helps you understand it a little bit more 😉
Regards
Hello @afv2688
I have another question:
Is it possible to print in a txt file only selected concepts?
Let's say I have a file called SourceFile:
Date | Tea | Milk | Coffee | Beer |
2020M11 | 36 | 25 | 11 | 15 |
2020M12 | 33 | 0 | 16 | 14 |
I also have a file called Map:
Concept | Code |
Tea | BEV001 |
Coffee | BEV002 |
I can use the Dynamic Rename tool
And get something like this:
Date | BEV001 | Milk | BEV002 | Beer |
2020M11 | 36 | 25 | 11 | 15 |
2020M12 | 33 | 0 | 16 | 14 |
My question would be:
Can I print to txt file only the concepts from my map and skip the useless ones?
Thank you
Hello @Stanislaw ,
You can perfectly do a rename and skip the ones you don't need. Check this workflow.
Regards