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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@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!:
Power BI Cookbook Third Edition (Color)

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!:
Power BI Cookbook Third Edition (Color)

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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