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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
CarlsBerg999
Helper V
Helper V

Concatenate values

Hi,

 

I need to create a calculated column to my dataset called "Concatenated values". The column lists all employees with the same Job except for the current person. Therefore we have three analysts and on Jessie's row, the two others are listed. How do i do this in a calculated column?

 

NameJobConcatenated values
JessieAnalystJohn, Dave
JohnAnalystJessie, Dave
MaryConsultantMatt
MattConsultantMary
DaveAnalystJessie, John
1 ACCEPTED SOLUTION

Hi, @CarlsBerg999 

Thank you for your feedback.

I tried to create a new sample based on the explanation.

 

Please check the link down below, and please try the below formula to create a new unique column.

 

Picture1.png

 

New Columns CC Fix =
VAR currentjob = 'Table'[Job]
VAR currentname = 'Table'[Name]
VAR newtable =
SUMMARIZE (
FILTER ( 'Table', 'Table'[Job] = currentjob && 'Table'[Name] <> currentname ),
'Table'[Name]
)
RETURN
CONCATENATEX ( newtable, 'Table'[Name], ", " )

 

 

https://www.dropbox.com/s/kf1y8k6hentdgdj/carls.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @CarlsBerg999 

Please check the below.

 

Picture7.png

 

 

New Columns CC =
VAR currentjob = 'Table'[Job]
VAR currentname = 'Table'[Name]
VAR newtable =
FILTER ( 'Table', 'Table'[Job] = currentjob && 'Table'[Name] <> currentname )
RETURN
CONCATENATEX ( newtable, 'Table'[Name], ", " )

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Hi, 

This seems to be doing the trick but the dataset contains the same name multiple times. Is it possible to return only the unique values? For example, now I have John 67 times on the Concatenax column

Hi, @CarlsBerg999 

Thank you for your feedback.

I tried to create a new sample based on the explanation.

 

Please check the link down below, and please try the below formula to create a new unique column.

 

Picture1.png

 

New Columns CC Fix =
VAR currentjob = 'Table'[Job]
VAR currentname = 'Table'[Name]
VAR newtable =
SUMMARIZE (
FILTER ( 'Table', 'Table'[Job] = currentjob && 'Table'[Name] <> currentname ),
'Table'[Name]
)
RETURN
CONCATENATEX ( newtable, 'Table'[Name], ", " )

 

 

https://www.dropbox.com/s/kf1y8k6hentdgdj/carls.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.