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
JN
Regular Visitor

Combine multiple rows of User data into one row with additional columns

Dear all,

 

I have a set of data that contains multiple rows for a person (recording_session_label). I would like to have just one row for each user (recording_session_label) and all data related to that recording_session_label in a separate columns.

 

My data looks like this. However, it contains a few thousand rows.

 

image.png

 

I would really appreciate some help. Please let me know if you need further information or data sets.

 

Best,

JN

1 ACCEPTED SOLUTION
JN
Regular Visitor

Thank you all for looking into this. A simple number index would be ok.

However, I could also do it manually with a pivot and copy paste. I initially thought this might be easy to code. So, no need to work on it. Thanks again

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

So you would have the last 8 columns repeated for as many rows that you have that are duplicated for a user?

 

Generally, that's not a very good idea at all. Why do you think you want to do that?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello Greg,

 

Exactly like this. I want to do some spss data analysis and need just one row for each user.

 

Best,

JN

Hmm, I've got nothing. @ImkeF and/or @MarcelBeug might have something.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Agree with @Greg_Deckler, this is very un-PowerBI-ish.

 

How shall your you new column names be? Every column needs a unique name, so do you want a simple number index for each row?

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

JN
Regular Visitor

Thank you all for looking into this. A simple number index would be ok.

However, I could also do it manually with a pivot and copy paste. I initially thought this might be easy to code. So, no need to work on it. Thanks again

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.