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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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