Forum Discussion
auron
3 years agoNew Member
Join multiple rows, sum a column and join another column
Dear all, i have a table like this one:
| id | field1 | field2 | spent | project |
| 123 | a | b | 1 | myprj |
| 123 | a | c | 3 | techprj |
| 456 | z | s | 2 | newp |
| 789 | w | a | 5 | greenPrj |
What i need is a DAX query to calculate a new table to join rows with the sam ID field by performing this operation:
- sum the spent column
- merge the project column which is always composed by strings.
The final table should be like:
| id | field1 | field2 | spent | project |
| 123 | a | c | 4 | myprj, techprj |
| 456 | z | s | 2 | newp |
| 789 | w | a | 5 | greenPrj |
Can you please help me? Thanks a lot
1 Reply
- amitchandakSuper User
auron , If you want measures
max(Table[field2])
sum(Table[spent])
and
concatenatex(Table, Table[project], ", ")
refer more options
Concatenate Text- Measure, DAX Table, and Power Query Table: https://youtu.be/xAh3tz1qo24