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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
spandy34
Responsive Resident
Responsive Resident

CONCATENATEX MATRIX NO DUPLICATES

Hello

 

I have the following matrix where the Rows are the Mission Project Field, the column is the Row field and the Values is the following DAX

 

z_Names_Matrix = CONCATENATEX(
    'Name Main','Name Main'[Name],"," & UNICHAR(10))
 
How do I amend the DAX so it only displays the persons name once as opposed to repeating them as the matrix displays below?
 
 
spandy34_0-1712769245684.png

 

 

@amitchandak @tamerj1 @danextian @goncalogeraldes @v-tangjie-msft @v-kaiyue-msft @Uzi2019 

1 ACCEPTED SOLUTION

@spandy34 You didn't use my code. Your code has syntax errors and will not work because it is not the correct logic. Use exactly this:

 

z_Names_Matrix = CONCATENATEX( DISTINCT( 'Name Main'[Name] ) , [Name], "," & UNICHAR(10))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@spandy34 Try:

z_Names_Matrix = CONCATENATEX(
    DISTINCT('Name Main'[Name]),[Name],"," & UNICHAR(10))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Thank you for your response.  I get the following error when I insert DISTINCT as you suggest

 

spandy34_0-1712819746440.png

 

@spandy34 You didn't use my code. Your code has syntax errors and will not work because it is not the correct logic. Use exactly this:

 

z_Names_Matrix = CONCATENATEX( DISTINCT( 'Name Main'[Name] ) , [Name], "," & UNICHAR(10))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you very much - that has worked.  Sorry about not copying the DAX properly.  I appreciate your time.

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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