cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamara_Motta
New Member

Concatenate [column of values] & [text column.], Does not work!

Olá boa tarde. Preciso de ajuda.

 

Eu preciso criar uma coluna que concatena dois campos de uma tabela.

 

O campo [NewColumn.UF] é um campo de texto.
O campo [Merchandise] é um campo de valor .

 

Usando a função "CONCATENAR" da seguinte maneira:

= Table.AddColumn (# "NewColumn Expanded2", "Personalizar", cada CONCATENATE ([NewColumn.UF], [Merchandise]))

Eu estou recebendo o seguinte erro:

Expression.Error: O nome 'CONCATENATE' não foi reconhecido. Verifique se ele foi escrito corretamente.

 

Pesquisando o fórum aqui, a seguinte correção foi feita:

= Table.AddColumn (# "NewColumn Expanded2", "Personalizar", cada Text.From ([NewColumn.UF] & [Merchandise]))

Mas ele me retorna para a coluna final mostrando "ERRO"

 

Pode me ajudar?

3 ACCEPTED SOLUTIONS

Accepted Solutions
Ross73312 Community Champion
Community Champion

Re: Concatenate [column of values] & [text column.], Does not work!

Using the Edit Queries menus, select 'Add Column' from the Ribbon and select the "Add Custom Column".

 

Name your new column and select your columns from the Right hand menu but place an "&" between them.

 

It might look something like

Capture.PNG


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


View solution in original post

Ross73312 Community Champion
Community Champion

Re: Concatenate [column of values] & [text column.], Does not work!

The code this creates would be:

    #"Added Custom1" = Table.AddColumn(#"Removed Columns", "NewColumn", each [Id] & [ParentId])

   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


View solution in original post

Moderator v-sihou-msft
Moderator

Re: Concatenate [column of values] & [text column.], Does not work!

@Tamara_Motta

 

You can create this calculated column via either DAX or Power Query. Just use "&" to concatenate two fields.

 

5.PNG

 

Regards,

View solution in original post

10 REPLIES 10
Tamara_Motta
New Member

Re: Concatenate [column of values] & [text column.], Does not work!

Hello good afternoon. Need help.
 
I need to create a column that concatenates two fields from a table.
 
The [NewColumn.UF] field is a text field.
The [Merchandise] field is a value field.
 
Using the "CONCATENATE" function as follows:
= Table.AddColumn (# "NewColumn Expanded2", "Customize", each CONCATENATE ([NewColumn.UF], [Merchandise]))
I'm getting the following error:
Expression.Error: The name 'CONCATENATE' was not recognized. Make sure it is spelled correctly.
 
Searching the forum here, the following correction was made:
= Table.AddColumn (# "NewColumn Expanded2", "Customize", each Text.From ([NewColumn.UF] & [Merchandise]))
But it returns me to the final column showing "ERROR"
 
Can you help me?

Ross73312 Community Champion
Community Champion

Re: Concatenate [column of values] & [text column.], Does not work!

Using the Edit Queries menus, select 'Add Column' from the Ribbon and select the "Add Custom Column".

 

Name your new column and select your columns from the Right hand menu but place an "&" between them.

 

It might look something like

Capture.PNG


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


View solution in original post

Ross73312 Community Champion
Community Champion

Re: Concatenate [column of values] & [text column.], Does not work!

The code this creates would be:

    #"Added Custom1" = Table.AddColumn(#"Removed Columns", "NewColumn", each [Id] & [ParentId])

   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


View solution in original post

zhangwenzhou
Regular Visitor

Re: Concatenate [column of values] & [text column.], Does not work!

Just try this = Table.AddColumn (# "NewColumn Expanded2", "Customize", each [NewColumn.UF] & Text.From ([Merchandise]))
Moderator v-sihou-msft
Moderator

Re: Concatenate [column of values] & [text column.], Does not work!

@Tamara_Motta

 

You can create this calculated column via either DAX or Power Query. Just use "&" to concatenate two fields.

 

5.PNG

 

Regards,

View solution in original post

Kpham90
Regular Visitor

Re: Concatenate [column of values] & [text column.], Does not work!

Hi, I keep getting errors on this:

 

Capture.PNG

Ross73312 Community Champion
Community Champion

Re: Concatenate [column of values] & [text column.], Does not work!

Put 'Number.ToText()' around your number column in the code.


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


Deanna_m0
New Member

Re: Concatenate [column of values] & [text column.], Does not work!

**I will be referring to columns as fields

 

Answer:  You will have to change your non-text value to a text value to combine it with text.

 

Example:

 

I have a "Date" field with the year 1997 in it and I want to join with a "Name" field that has Jeremy in it.

 

If I Add Column > Custom Column and enter the following formula inside the Custom column formula:  = [Date] & " " & [Name]

 

An error will result.

 

But, If I first go to my "Date" field before creating the formula and Transform > Data Type: Date to Data Type: Text (by clicking the dropdown) the formula will work.

 

= [Date] & " " & [Name]  will result in 1997 Jeremy

 

 Note:  As you may want to keep you date field formatted as a date, it may be a good idea to Duplicate the [Date] field and change the format of the new field to Data Type: Text.  The new field would be named [Date - copy] if you do not rename it.

 

 

 

 

michellemetzger
New Member

Re: Concatenate [column of values] & [text column.], Does not work!

You can try something along these lines and it will work:

 

Table.AddColumn(#"Removed Duplicates", "SName", each [Text Value] & Number.ToText([Numeric Value]) )

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors