Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mb0307
Responsive Resident
Responsive 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 this in Power Query as Input like this:

 

{Cube.ApplyParameter, "[!V99]", {{ Text.Combine ( CODE ) }}}

 

Thank you!

1 ACCEPTED SOLUTION
mb0307
Responsive Resident
Responsive Resident

Found solution:

 

 

     {Cube.ApplyParameter, "[!V99]", {"""" & Text.Combine(TableName[ColName],""", """) & """" }}

 

View solution in original post

8 REPLIES 8
mb0307
Responsive Resident
Responsive Resident

Found solution:

 

 

     {Cube.ApplyParameter, "[!V99]", {"""" & Text.Combine(TableName[ColName],""", """) & """" }}

 

Anonymous
Not applicable

@mb0307 
Try the following code.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUorViVYyNjAwADPAhBEKzxwIlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Column1] <> "")),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Custom", each """"&[Column1]&""""),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Column1"}),
    #"Transposed Table" = Table.Transpose(#"Removed Columns"),
    #"Merged Columns" = Table.CombineColumns(#"Transposed Table",{"Column1", "Column2", "Column3"},Combiner.CombineTextByDelimiter(",", QuoteStyle.None),"Merged")
in
    #"Merged Columns"

Vpazhenmsft_0-1637040744516.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

mb0307
Responsive Resident
Responsive Resident

@Anonymous Thanks but if you see my post then I do not want to create a merged column.  

 

I am looking to insert concatenate in the code here

{Cube.ApplyParameter, "[!V99]", {{ Text.Combine(CODE TO COMBINE ALL ROWS WITH ""}}},

 

so the text passed to source system looks like this (WITH ""s):

"3000", "2000", "7777"

 

Thanks

AlexisOlson
Super User
Super 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(_).

@AlexisOlson  Thanks

 

My column is Text already so used _ instead.

 

But I get this error:

Error.jpg

 

Code:

{Cube.ApplyParameter, "[!V99]", {{ Text.Combine(List.Transform( ForBW[Last Friday of Month], each """" & _ & """"), ",") }}},

 

Thanks

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 """" & _ & """"), ",") }},

 

Sorry, I don't know what's causing the error.

Thanks for trying. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors