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
LakiCG
Frequent Visitor

Calculated table with columns based on the values from another table

Hi,

 

Does anyone know how I can transform next table which is data source to the second table shown below.

This is my data source. As you can see, there are multiple rows referring to the sam transaction.

TransactionIDNameRoleLocations
001John SmithSales PersonNew York
001David JohnsonManagerNew York
001Alex BermanBuyerNew York
002Mike TomphsonSales PersonBoston
002Dan JordanManagerBoston
002Marko BlackBuyerBoston

 

I would like to transform this sourcing table in Power BI to the table below (based on the people's role from the first table, I want to create the new columns, so each transaction is shown just in one row). This is what I want to see in Power BI:

TransactionIDSales PersonManagerBuyerLocations
001John SmithDavid JohnsonAlex BermanNew York
002Mike TomphsonDan JordanMarko BlackBoston

 

Please does anyone has an idea how to achieve this?

 

Many thanks!

Laki

1 ACCEPTED SOLUTION
dramus
Continued Contributor
Continued Contributor

Pivot the Roles column.

 

 

pivot.PNG

 

Capture.PNGi

View solution in original post

2 REPLIES 2
dramus
Continued Contributor
Continued Contributor

Pivot the Roles column.

 

 

pivot.PNG

 

Capture.PNGi

LakiCG
Frequent Visitor

It works. Thank you!

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.