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
gracie494
Helper I
Helper I

Dax, combine, List all values into one new column based on an existing column

Hello, how do I create a new column that combines all values in one column into One.

(See example Below) The goal is to create the new column based on every value in year

 

RUYearNew Column
REDS20202018, 2019, 2020
LOWS20192018, 2019, 2020
DEDS20202018, 2019, 2020
HAPPS20182018, 2019, 2020
1 ACCEPTED SOLUTION

@gracie494 Did that help?

If not, you can achieve that by adding a new column.

Create a new calculated column as ;

New Column=CONCATENATEX(Table,Table[YEAR],",")

 

Regards,

Sanket Bhagwat

View solution in original post

4 REPLIES 4
SanketBhagwat
Solution Sage
Solution Sage

Hi @gracie494 .

Please refer this link ;

https://exceloffthegrid.com/power-query-combine-rows-into-a-single-cell/

 

If this post helps, then please mark it as 'Accept as Solution'.

 

Regards,

Sanket Bhagwat

@gracie494 Did that help?

If not, you can achieve that by adding a new column.

Create a new calculated column as ;

New Column=CONCATENATEX(Table,Table[YEAR],",")

 

Regards,

Sanket Bhagwat

I want to do something similar, but I need to only combine emails into a combined email columns specific to a company. Any ideas? I'll be using this in a dashboard to select companies I want to communicate with and copy-paste the value of the combined emails into an email.  I was able to this in excel using another table with TEXTJOIN. =TEXTJOIN("; ",TRUE,(P9:P251))

Note this is a huge contact list, & the companies I communicate with have different scope of work, so this needs to filterable in the dashobard by the scope of work as well as the company. 

Example: 

Company:Contact Name: Email: Combined
ABC ElectricJane Doej.doe@ABCelectric.comj.doe@ABCelectric.com; j.smith@ABCelectric.com; t.allen@ABCelectric.com
ABC ElectricJohn Smithj.smith@ABCelectric.comj.doe@ABCelectric.com; j.smith@ABCelectric.com; t.allen@ABCelectric.com
ABC ElectricTim Allent.allen@ABCelectric.comj.doe@ABCelectric.com; j.smith@ABCelectric.com; t.allen@ABCelectric.com
Another CoTom HastingsTom@anotherco.netTom@anotherco.net; Jen@anotherco.net; Rob@anotherco.net
Another CoJen ArcherJen@anotherco.netTom@anotherco.net; Jen@anotherco.net; Rob@anotherco.net
Another CoRobert LangRob@anotherco.netTom@anotherco.net; Jen@anotherco.net; Rob@anotherco.net

Thanks so much, I had to modify the fomula to 

Listed Year = CONCATENATEX ( DISTINCT(RU[Financial Year]),RU[Financial Year],",") and now it works.
Kind Regards 🙂
 

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.

Top Solution Authors