Forum Discussion
mb0307
4 years agoResponsive Resident
Concatenate single column
Hi all, I want to concatenate all values in a column with " prefix and suffix and , Example: Column1 3000 2000 7777 I want result to be: "3000", "2000", "7777" I will be using th...
- 4 years ago
Found solution:
{Cube.ApplyParameter, "[!V99]", {"""" & Text.Combine(TableName[ColName],""", """) & """" }}
AlexisOlson
4 years agoSuper User
If you have a list of integers in Table1[Column1], then
= Text.Combine(List.Transform(Table1[Column1], each """" & Number.ToText(_) & """"), ",")
If it's already text, then you just need _ instead of Number.ToText(_).
- mb03074 years agoResponsive Resident
AlexisOlson Thanks
My column is Text already so used _ instead.
But I get this error:
Code:
{Cube.ApplyParameter, "[!V99]", {{ Text.Combine(List.Transform( ForBW[Last Friday of Month], each """" & _ & """"), ",") }}},Thanks
- AlexisOlson4 years agoSuper User
Sorry, I don't know what's causing the error.
- mb03074 years agoResponsive Resident
Thanks for trying.
- AlexisOlson4 years agoSuper User
I think you have an extra set of {} here. Can you check if this works?
{Cube.ApplyParameter, "[!V99]", { Text.Combine(List.Transform( ForBW[Last Friday of Month], each """" & _ & """"), ",") }},