I've attached an Alteryx workflow for reference, essentially I can't quite think of a way to write a formula that will generate a number and comma combination from a single number.
What I am looking for is:
Input
Input - Single number | Output - Each number going up to the number with a comma in between. No comma at end |
4 | 1,2,3,4 |
5 | 1,2,3,4,5 |
6 | 1,2,3,4,5,6 |
7 | 1,2,3,4,5,6,7 |
Has anyone done this before and how was it done? I'm thinking that I have to do some multi row formula but I'd really like to have it done in Formula. An option I am thinking of is to use a for loop in the Formula tool itself is that possible?
Hey @JessicaXChung, you can generate rows up to the number in your reference field. After that, just convert the new field to a string data type and you can concatenate the values in a Summarize tool, grouping on your original field: