Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Concatenate Aggregated Values

Hi All,

 

Appreciate your help. 🙏

 

Table:

GamePlatformUnit
SpidermanPlayStation10
SpidermanXbox5
SpidermanPC1
BatmanPlayStation20
BatmanPC10
SupermanXbox15

 

Desired Output

GamePlatformUnit
SpidermanPlayStation, Xbox, PC16
BatmanPlayStation, PC30
SupermanXbox15

 

Thanks 🙏

  • Anonymous , one of the ways is to use the following measure in the table visual with Game

     

    Platform cat = concatenatex(distinct(Table[Platform]), Table[Platform], " , ")

    Unit Sum = sum(Table[Unit])

     

    Or create a new table

    Summarize(Table, Table[Game], "Platform",  concatenatex(distinct(Table[Platform]), Table[Platform], " , ") 

    ,"Unit", sum(Table[Unit]) )

     

4 Replies

  • Anonymous , one of the ways is to use the following measure in the table visual with Game

     

    Platform cat = concatenatex(distinct(Table[Platform]), Table[Platform], " , ")

    Unit Sum = sum(Table[Unit])

     

    Or create a new table

    Summarize(Table, Table[Game], "Platform",  concatenatex(distinct(Table[Platform]), Table[Platform], " , ") 

    ,"Unit", sum(Table[Unit]) )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Thanks for the prompt reply.

      Platform cat = concatenatex(distinct(Table[Platform]), Table[Platform], " , ") is producing duplicates. e.g. PlayStation, PlayStation, PlayStation, PlayStation, PlayStation, PlayStation