Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ghutchins
Helper II
Helper II

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)

ActionUsername
Develop and Roll out Program ABob
Develop and Roll out Program ATony
Develop and Roll out Program AWendy

 

What I wanna get to

ActionUsername
Develop and Roll out Program ABob, Tony, Wendy
Develop and Roll out Program BRalph, Chuck, Todd
Develop and Roll out Program CGweneth, Hallie, Vanna

 

Column = CONCATENATEX(TableName,TableName[UserName],", ") -->  puts all 'Usernames' in the table in each 'Action'
Measure = CONCATENATEX(TableName,TableName[UserName],", ") -->  puts all 'Usernames' in the table in Total section
 
Feels like i am so close yet so far away...

1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
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.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

3 REPLIES 3
Mikelytics
Resident Rockstar
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.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Thank you @Mikelytics !  Just the ticket!

Hi @ghutchins,

 

Aweseom! 🙂

 

THank you for your feedback.

 

Best regards

Michael

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.