Forum Discussion

spandy34's avatar
spandy34
Icon for Responsive Resident rankResponsive Resident
2 years ago
Solved

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?
 
 

 

 

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

  • 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))

4 Replies

    • spandy34's avatar
      spandy34
      Icon for Responsive Resident rankResponsive Resident

      Hi Greg_Deckler 

       

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

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        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))