Forum Discussion

FrancescoSCP's avatar
FrancescoSCP
Icon for Helper IV rankHelper IV
6 years ago
Solved

Concatenate values by dimension

Hi all,

 

i have some data like this...

 

CUSTOMER  ACTIVITY  DESC

1                   AA            Started

1                   AA            Completed

2                   AA            Started

2                   AA            Waiting..

2                   AB            Stopped

 

 

I want to create a matrix wiew that has customers on rows and activities on columns.

On values i want to put concatenation of DESC field.

 

For example

 

 

Is there a function in Power BI or some DAX to concatenate those strings?

 

Thanks,

Francesco

  • FrancescoSCP parry2k 

     

    To add to parry2k solution, you might need to add a VALUES around the table reference in the measure, to avoid repetition of values 

    ie:

    My Desc = CONCATENATEX(VALUES(Test[Desc]), Test[Desc], ", ")

5 Replies

  • FrancescoSCP try this measure, change table and column name as per your model.

     

    My Desc = CONCATENATEX ( Test, Test[Desc], ", " ) 

     

    Add matrix visual with following columns

     

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

      FrancescoSCP parry2k 

       

      To add to parry2k solution, you might need to add a VALUES around the table reference in the measure, to avoid repetition of values 

      ie:

      My Desc = CONCATENATEX(VALUES(Test[Desc]), Test[Desc], ", ")
      • FrancescoSCP's avatar
        FrancescoSCP
        Icon for Helper IV rankHelper IV

        Hi,

         

        thanks guys, i will test this and let you know..

         

        Regards,

        Francesco