Hi everyone,
I am trying to make a Column that contains multple numbers as factor.
For example I have 3 Column with number 1, 5 and 7. I would like to add those number into 1 Column like this: (1, 5, 7) instead of (13) which is sum of these numbers.
Could somebody give me a formule that might fix my problem?
Kind regards,
Karan
Solved! Go to Solution.
Hi @KaranHva ,
You can use a transpose tool to pivot the columns you want to add in one column (make sure you select all other columns as key columns in the transpose tool.
Then add a select tool and change the data type of the column [Value] to be a vwstring. Finally with a summarize tool, you can concatenate the values under the [value] column and use comma as a delimiter (again don't forget to group on any other dimension).
Hello @KaranHva ,
If you are specifically looking for a formula that you can use in a formula tool, then the below should work.
ToString([Field1]) + ', ' + ToString([Field2]) + ', ' + ToString([Field3])
Hi @KaranHva ,
I think the issue was in the transpose tool, so the key columns are those that you don't want to pivot and the data columns are those that will get pivoted.I believe you have select them the other way around.
Have a look at the attached workflow and let me know if that's heading towards the right direction. The way suggested by @steven_king works perfect, but in case you want to concatenate 15 columns together that will create a huge expression which is hard to maintain.
Cheers,
Angelos