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

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

Accepted Solutions
Vvelarde Super Contributor
Super Contributor

Re: create custom column concatenated

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



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

Proud to be a Datanaut!




View solution in original post

9 REPLIES 9
Vvelarde Super Contributor
Super Contributor

Re: create custom column concatenated

A Sample:

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

 

 

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

 

 




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

Proud to be a Datanaut!




vitexo87 Member
Member

Re: create custom column concatenated

@Vvelarde

 

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

Vvelarde Super Contributor
Super Contributor

Re: create custom column concatenated

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



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

Proud to be a Datanaut!




View solution in original post

vitexo87 Member
Member

Re: create custom column concatenated

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

scottsen Senior Member
Senior Member

Re: create custom column concatenated

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])

 

Vvelarde Super Contributor
Super Contributor

Re: create custom column concatenated

 

hi @vitexo87

 

YearColumn = YEAR(TablewithDate[DateField])

 

 




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

Proud to be a Datanaut!




vitexo87 Member
Member

Re: create custom column concatenated

@Vvelarde

I tried this but it did not work

Untitled.png

Vvelarde Super Contributor
Super Contributor

Re: create custom column concatenated

Date.Year (DateField)




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

Proud to be a Datanaut!




Highlighted
Sean Super Contributor
Super Contributor

Re: create custom column concatenated

@vitexo87 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

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 348 members 3,213 guests
Please welcome our newest community members: