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

Creating new tables based on relationship with another table

I have two related tables one with Master records the other with Detail on a one to many relationship.

 

What I want to do is, for each Master Record create a new table for Detail records BUT I want to transform the Detail records so that rows become columns and columns become rows so that the first column in the Detail records become the column headers in the transfromed table.

 

I have attached a photgraph below of the Detail data records.

 

What I need is for there to be a single row for each Event ID so keeping that as a column heading, then treat the contents of the second column as row headers.

 

Any help much appreciated.

 

Paul

 

EventDetail.gif

1 ACCEPTED SOLUTION
ankitpatira
Community Champion
Community Champion

@PaulBoyes If i understood you correct, go to power bi desktop query editor

 

1. select eventid column under Transform tab click Pivot Column

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. In pivot column dialog box, select Don't aggregate under Advanced Options and click Ok.

 

Capture.PNG

View solution in original post

1 REPLY 1
ankitpatira
Community Champion
Community Champion

@PaulBoyes If i understood you correct, go to power bi desktop query editor

 

1. select eventid column under Transform tab click Pivot Column

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. In pivot column dialog box, select Don't aggregate under Advanced Options and click Ok.

 

Capture.PNG

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.