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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
dw700d
Post Patron
Post Patron

combining two rows into one

I have two columns. Column 1 contains the names of account holders. Column 2 contains account codes, I would like to create a measure that determines if an account holder has multiple account codes  and then combines those occurrences into one row.

 

Current output

 

Account Holder

Account Code

Tim

ABC

Tim

DEF

John

GHI

John

JKL

Bill

MNO

 

Desired output

 

Account Holder

Account Code

Tim

ABC+DEF

John

GHI+JKL

Bill

MNO

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dw700d ,

 

You could create a calculated column.

Column = CONCATENATEX(FILTER('Table',[Account Holder]=EARLIER('Table'[Account Holder])),'Table'[Account Code],"+")

vstephenmsft_0-1652684668569.pngvstephenmsft_1-1652684690524.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @dw700d ,

 

You could create a calculated column.

Column = CONCATENATEX(FILTER('Table',[Account Holder]=EARLIER('Table'[Account Holder])),'Table'[Account Code],"+")

vstephenmsft_0-1652684668569.pngvstephenmsft_1-1652684690524.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

speedramps
Super User
Super User

Hi dw700d

 

Try this

Answer =

CONCATENATEX(Yourtable,Yourtable[AccountCode],"+")
 
Please click the thumbs up and accept as solutions buttons.
If you need add extra complexity to the problem then please accept this solution and raise new tickets.
You will get a response and each solver get the kudos they deserve. Thanks. 😀

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors