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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Switch row to column on Data table

Hi Everyone,

 

I have a data table wherein i need to transponse the row to column but my challenge is, it has more than 2 lacs records connected with SQL.

 

Is this possible to transpose in Power BI.? Please refer the example on my snapshot.

 

d7775a79-0dce-4432-84f2-2339a817d814.png

3 REPLIES 3
Vijay_A_Verma
Super User
Super User

Transform menu - Use headers as first row

Transform menu - Transpose

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJ0BBKGRkbGSrE60UpGQI6TE0gELmQM5Dk7QxSBBUyAbBcXuK5YAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Sap_customer_code = _t, MSC_CODE = _t, Company_code = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Sap_customer_code", Int64.Type}, {"MSC_CODE", type text}, {"Company_code", Int64.Type}}),
    #"Demoted Headers" = Table.DemoteHeaders(#"Changed Type"),
    #"Transposed Table" = Table.Transpose(#"Demoted Headers")
in
    #"Transposed Table"

 

@Vijay_A_Verma  Thank you so much for the reply however how could i able to bring all my 2 lacs records into this query. That is my challenge.

Get your data in PQ from your source. Then follow the below steps

Transform menu - Use headers as first row

Transform menu - Transpose

 

If you are still facing issue in getting data into PQ, please provide details of your source and problem being faced.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors