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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.