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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors