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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Margh9
Regular Visitor

Change row in multiple columns

Hi, 

I need help to convert this data set.  I need to make SessionID be a unique value. (At this time it is not) and that the DateTime and Event column must be associated with the SessionId only once. I want a single row for sessionID with a column for StartEvent, a column for EndEvent/ErrorEvent, and the corresponding timestamp in another one.
Let me give an example: each SessionID corresponds to an event of type "Start" and one of type "End" or "Error" and the corresponding timestamp. I tried doing a group by SessionId and using the unpivot function but the result is not what I wanted. Can you give me a hand please? I didn't find anything similar in the forum

 

Margh9_2-1704733124200.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Margh9 

 

Based on your description, I feel like you should try Pivot instead of Unpivot. From the screenshot, some SessionIDs may have multiple datetimes for an event. If you want to remain only one datetime of an event, you need to choose an appropriate aggregation function for the DateTime column.

Pivot columns - Power Query

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Margh9 

 

Based on your description, I feel like you should try Pivot instead of Unpivot. From the screenshot, some SessionIDs may have multiple datetimes for an event. If you want to remain only one datetime of an event, you need to choose an appropriate aggregation function for the DateTime column.

Pivot columns - Power Query

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

selimovd
Super User
Super User

Hey @Margh9 ,

 

can you give an example how the result should look like?

I don't understand your description to be honest...

 

Also please share the data as table or better a PBIX file. If I want to re-create that case I will not type in the values from the screenshot...

 

Thank you and best regards

Denis

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.