Forum Discussion
Combine Text in a Column to a Row
In a table in Power BI I have 2 columns 'Action' and 'UserName' For each 'Action' there may be one, two, ... n 'Usernames' associated to that 'Action' in successive rows. I would like to create a measure/column that lists the 'Action' one time and this new measure/column would contain all the usernames. Is this even possible? I have no option to change the way the data source.
What I have now (Program A not the only Action)
| Action | Username |
| Develop and Roll out Program A | Bob |
| Develop and Roll out Program A | Tony |
| Develop and Roll out Program A | Wendy |
What I wanna get to
| Action | Username |
| Develop and Roll out Program A | Bob, Tony, Wendy |
| Develop and Roll out Program B | Ralph, Chuck, Todd |
| Develop and Roll out Program C | Gweneth, Hallie, Vanna |
HI ghutchins
Try your measure like this:
Measure = IF( HASONEVALUE(TableName[Action]), CONCATENATEX(TableName,TableName[UserName],", "), BLANK() )Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
3 Replies
- Mikelytics
Resident Rockstar
HI ghutchins
Try your measure like this:
Measure = IF( HASONEVALUE(TableName[Action]), CONCATENATEX(TableName,TableName[UserName],", "), BLANK() )Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
- ghutchins
Helper II
Thank you Mikelytics ! Just the ticket!
- Mikelytics
Resident Rockstar