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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Anonymous
Not applicable

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

View solution in original post

Anonymous
Not applicable

The code this creates would be:

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

View solution in original post

@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

11 REPLIES 11
Anonymous
Not applicable

Boa noite! Gostaria de entender como concateno um valor mantendo sua formatação em %, concatenando-o a um texto.

 

Ex: 

Coluna A: 10% 

Coluna B = Casa

Valor a concatenar = 10% casa

 

tentei algo do tipo:

tentativa 1: Valor a concatenar = [Coluna A]& " "&[Coluna B]

tentativa 2: Valor a concatenar = CONVERT[Coluna A]; STRING)& " "&[Coluna B]

 

Obrigado!

zhangwenzhou
Regular Visitor

Just try this = Table.AddColumn (# "NewColumn Expanded2", "Customize", each [NewColumn.UF] & Text.From ([Merchandise]))
Tamara_Motta
New Member

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?

**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.

 

 

 

 

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

 

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

.. I was so lost reading until get your Clean and tidy answer. Thank you!

@Tamara_Motta

 

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

 

5.PNG

 

Regards,

Hi, I keep getting errors on this:

 

Capture.PNG

Anonymous
Not applicable

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

Anonymous
Not applicable

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

Anonymous
Not applicable

The code this creates would be:

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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