cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

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
Highlighted
Community Champion
Community Champion

Re: create custom column concatenated

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



Lima - Peru

View solution in original post

10 REPLIES 10
Highlighted
Community Champion
Community Champion

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
Highlighted
Post Prodigy
Post Prodigy

Re: create custom column concatenated

@Vvelarde

 

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

Highlighted
Community Champion
Community Champion

Re: create custom column concatenated

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



Lima - Peru

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

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.

Highlighted
Memorable Member
Memorable 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])

 

Highlighted
Community Champion
Community Champion

Re: create custom column concatenated

 

hi @vitexo87

 

YearColumn = YEAR(TablewithDate[DateField])

 

 




Lima - Peru
Highlighted
Post Prodigy
Post Prodigy

Re: create custom column concatenated

@Vvelarde

I tried this but it did not work

Untitled.png

Highlighted
Community Champion
Community Champion

Re: create custom column concatenated

Date.Year (DateField)




Lima - Peru
Highlighted
Community Champion
Community Champion

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors