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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MK_Aqipa
Frequent Visitor

Power query - concatenate text columns

Hi,

I need to combine two text columns. I've tried it in the custom column with the & Formuala, but I get an error. 

= Table.AddColumn(#"Geänderter Typ", "Text.Combine", each [FCURR]&[Period])

 

Anyone has an idea how i can solve it?

 

thanks in advance,

regards

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@MK_Aqipa,

 

is [FCURR] and [Period] of type Text? What is the error you get?

 

Also, where is your function Text.Combine( )? It looks like you've just joined with '&' which should give you something like:

 

[Column1]&[Column2]

outputs 'helloworld'
Text.Combine({[Column1],[Column2]}," " )

outputs 'hello world'

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
Rickmaurinus
Helper V
Helper V

The trick when concatenating values is to make sure they are of the Text sort. 

 

So either:

- Make sure the entire column is text

- Use a function that transforms the value to text during the evaluation. 

 

I think anyone struggling with this may enjoy this article: 

 

https://gorilla.bi/power-query/concatenate-values/

 

Also take into account that referencing null values may result in different values.

 

--------------------------------------------------

 

@ me in replies or I'll lose your thread

 

Master Power Query M? -> https://powerquery.how

Read in-depth articles? -> BI Gorilla

Youtube Channel: BI Gorilla

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly.

ChrisMendoza
Resident Rockstar
Resident Rockstar

@MK_Aqipa,

 

is [FCURR] and [Period] of type Text? What is the error you get?

 

Also, where is your function Text.Combine( )? It looks like you've just joined with '&' which should give you something like:

 

[Column1]&[Column2]

outputs 'helloworld'
Text.Combine({[Column1],[Column2]}," " )

outputs 'hello world'

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



thanks for your fast reply....with two text columns it worked now 🙂

 

=Text.Combine({[FCURR],[TCURR]}," " )

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors