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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

convert columns to rows in table vizual or matrix vizual

HI
i want to convert rows to columns is it possible in martix or table vizual 
for example i have data like 

Country Codes    amount     profit       loss    
US                       100            20             0
IND                      200           0               60
UK                        300          30             0

i need a data like 
country code     US    IND    UK
Amount            100    200    300
Profit                 20      0       30
Loss                 0         60      0

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

Hi @Anonymous ,

Thanks for the information you have given.

Setting up a matrix and set the field "Country Codes" to Columns and the fields "amount", "profit" and "loss" as Values:

vjinchengmsft_0-1704687058652.png

 

In visualization, find visual>values>options and turn on "Switch Values to rows":

vjinchengmsft_1-1704687058655.png

And you'll get the results you expect.

vjinchengmsft_2-1704687074607.png

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Joseph Ji

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-jincheng-msft
Community Support
Community Support

Hi @Anonymous ,

Thanks for the information you have given.

Setting up a matrix and set the field "Country Codes" to Columns and the fields "amount", "profit" and "loss" as Values:

vjinchengmsft_0-1704687058652.png

 

In visualization, find visual>values>options and turn on "Switch Values to rows":

vjinchengmsft_1-1704687058655.png

And you'll get the results you expect.

vjinchengmsft_2-1704687074607.png

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Joseph Ji

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

we have buid the report with the function switch values to rows but How can we export the data into excel with same format. is it possible?
when i am trying to export the data into excel the values are not converting into rows. i need to export the data as per power bi screenshot

Screenshot 2024-01-29 134449.pngexcel format 

 Screenshot 2024-01-29 151618.pngpower bi 

kleigh
Responsive Resident
Responsive Resident

If Amount, Profit, Loss are coming from the Values well, try Visual > Values > Options and turn on "Switch values to rows", then set country code as column.

Anonymous
Not applicable

do we have any seperate vizual or we can try in table or matrix vizual

Anonymous
Not applicable

Thank you I will try 

kleigh
Responsive Resident
Responsive Resident

This is in the Matrix visual. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.