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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.