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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

create custom column concatenated

I'm fumbling create a custom column in a table that has already been loaded, this column will be used to relate that table to another, however I am unable to create this custom column.
I need to concatenate all the fields that are in the picture, I do not know what function and how to use, can someone help me?

 

Untitled.png

1 ACCEPTED SOLUTION

Text.From([Column) & Text.From([Column2]) & Text.From([Column3])



Lima - Peru

View solution in original post

10 REPLIES 10
Vvelarde
Community Champion
Community Champion

A Sample:

=[Segment] & Text.From([Count])

 

 

If you column is not a string use Text.From([Column]) else just the column name

 

 




Lima - Peru

Thanks for explaining why to use Text.From()

Anonymous
Not applicable

@Vvelarde

 

in my chance all the columns are of type int, as would be?

Text.From([Column) & Text.From([Column2]) & Text.From([Column3])



Lima - Peru
Anonymous
Not applicable

@Vvelarde

taking advantage, I have a date field that is in the format (dd / mm / yyyy hrs) and need to create a custom column from that field that presents only the yyyy, tried some string functions however nothing.

 

hi @Anonymous

 

YearColumn = YEAR(TablewithDate[DateField])

 

 




Lima - Peru
Anonymous
Not applicable

@Vvelarde

I tried this but it did not work

Untitled.png

Date.Year (DateField)




Lima - Peru
Sean
Community Champion
Community Champion

@Anonymous an alternative that will generate the M formula @Vvelarde gave you above is

 

In the Query Editor => select your Date column => go Add Column tab => Date => Year => Year

(this will basically do the same thing)

 

QueryEditor - YEAR.png

Anonymous
Not applicable

I suspect "The Feature That We Don't Call Power Query" is the best place to do this (which is what folks are doing here) ... but you can also do this via a dax calculated column as well.

 

something like:

MyCalcColumn = MyTable[MyColumn1] & "-" & MyTable[MyColumn2] & "-" & YEAR(MyTable[MyDateColumn])

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.