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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Jaweed
Helper III
Helper III

Assistance ( Reposted - wrong location)

Hi everybody
 
How to transform a table in PowerBi

Hi everybody

Can Anybody assist me? I have a table in Power Bi that I uploded. Typical records are as below.

Company       Country-Deal-with

Cpy1               USA

Cpy1               France

Cpy1               Belgium

Cpy2               UK

CPy2               France

CPy3               India

CPY2               USA

 

I would like to have one record per company with different columns. I do not know if PBi can handle.

Company      Col 1     Col2         Col3                   Col-combined

Cpy1              USA      France      Belgium             USA France Belgium

Cpy2              UK        France                                UK France

Cpy3              India      USA                                  India USA

 

I would highly appreciate your help. Thanks

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Jaweed 

You can try the following steps:

Sample:

v-angzheng-msft_0-1618363955257.jpeg

Step1:Transpose column in Query Editor

v-angzheng-msft_1-1618363955261.jpeg

v-angzheng-msft_2-1618363955263.jpeg

Step2:Use First Row as Headers

v-angzheng-msft_3-1618363955265.jpeg

Step3:Merge columns

v-angzheng-msft_4-1618363955266.jpeg

v-angzheng-msft_5-1618363955266.png

Step4:User Headers as First Row and Transpose columns

v-angzheng-msft_6-1618363955267.jpeg

v-angzheng-msft_7-1618363955268.png

Step5:Duplicate columns and split columns

v-angzheng-msft_8-1618363955268.jpeg

v-angzheng-msft_9-1618363955269.jpeg

Result:

v-angzheng-msft_10-1618363955270.png

Finally, to change the name of the first column to what you want.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @Jaweed 

You can try the following steps:

Sample:

v-angzheng-msft_0-1618363955257.jpeg

Step1:Transpose column in Query Editor

v-angzheng-msft_1-1618363955261.jpeg

v-angzheng-msft_2-1618363955263.jpeg

Step2:Use First Row as Headers

v-angzheng-msft_3-1618363955265.jpeg

Step3:Merge columns

v-angzheng-msft_4-1618363955266.jpeg

v-angzheng-msft_5-1618363955266.png

Step4:User Headers as First Row and Transpose columns

v-angzheng-msft_6-1618363955267.jpeg

v-angzheng-msft_7-1618363955268.png

Step5:Duplicate columns and split columns

v-angzheng-msft_8-1618363955268.jpeg

v-angzheng-msft_9-1618363955269.jpeg

Result:

v-angzheng-msft_10-1618363955270.png

Finally, to change the name of the first column to what you want.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng

daxer-almighty
Solution Sage
Solution Sage

@Jaweed 

 

Why would you like to do it? The format you're trying to get the data into is not correct for reports in PBI. It's, of course, easily obtained through Power Query but why the heck would you want to do it? You can easily get the matrix visual to display data like this... The column Col-combined can be obtained easily through a measure as well.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.