Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
in Power BI by 16 16 22

I have a table in Power BI that has the following structure:

| Product Name | Quantity Sold 
| iPhone 13 | 100 
| Samsung Galaxy S22 | 50 
| Google Pixel 6 | 25 

I want to convert this table so that the product names are in the columns and the quantity sold are in the rows. How can I do this in Power BI?

1 Answer

2 like 0 dislike
by 152 169 345
selected by
Best answer

How to convert rows to columns in Power BI?

Converting rows to columns in Power BI, also known as pivoting, is a common data transformation process that involves reorganizing data to make it more structured and easier to analyze.
This operation is particularly useful when you have data in a tabular format and want to present it in a different layout for reporting or visualization purposes.

How to Pivot Columns in Power BI?


To convert rows to columns in Power BI, you have to do the following:

  1. In Power BI Desktop, Click on "Transform Data" to open "Query Editor".
    Transform Data in Power BI
  2. In Power Query Editor, select the columns that you want to pivot. These are the rows you want to convert into columns.
  3. Click on the "Transform" tab in the Power Query Editor ribbon.
  4. Click on the "Pivot Column" option.
    Pivot Column in Power BI
  5. A dialog box will appear, In the Pivot Column dialog, select the column whose values you want to spread across new columns.
    How to convert rows to columns in Power BI
  6. Great the Rows is now converted to Columns as stated below
    How to pivot rows to columns in Power BI

See Also

If you don’t ask, the answer is always NO!