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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aktripathi2506
Helper IV
Helper IV

Replacing columns with rows

Hi,

 

In my table suppose I have 5 column A, B, C, D and E. I have values for them.

 

Example:

 

ABCDE
52215324
1048259
119644
21481211
25112104
3248715
25159228
48746
12669

8

 

Now when I display the average of these column it comes like this:

 

Avg of AAvg of BAvg of CAvg of DAvg of E
1697147

 

 

But I want to display it like below:

 

Avg of A16
Avg of B9
Avg of C7
Avg of D14
Avg of E7

 

Please advise.

 

Thanks a lot.

1 ACCEPTED SOLUTION

@aktripathi2506

 

In Power BI Desktop, you can directly use your large input table and return the average of each item without exporting the data at all. Please refer to steps below:

  1. Add an Index column(from 1).
    Capture1.PNG
  2. Right click on Index column, select "Unpivot other columns".
    Capture2.PNG
  3. Click on "Attribute" column, select "Group By".
    Capture6.PNG
  4. Set "Group by" like below. You will get expect result.
    Capture3.PNG
    Capture4.PNG

Regards,

View solution in original post

7 REPLIES 7
arify
Microsoft Employee
Microsoft Employee

Hi,

 

Once you have the 2nd table:

 

Avg of AAvg of BAvg of CAvg of DAvg of E
1697147

 

You can select all columns (click first column, then shift+click last column), right click, pick "Unpivot Columns". That will produce exactly what you want 🙂

 

Hi,

 

I have a big input table, which has several columns including columns A, B, C,D and E.

 

2nd table I am getting is as a result. Do you know any way to use this table as an input other than exporting the data and uploading it again to power bi and then doing unpivot the columns.

 

Because I want less mannual efforts.

 

Thanks.

@aktripathi2506

 

In Power BI Desktop, you can directly use your large input table and return the average of each item without exporting the data at all. Please refer to steps below:

  1. Add an Index column(from 1).
    Capture1.PNG
  2. Right click on Index column, select "Unpivot other columns".
    Capture2.PNG
  3. Click on "Attribute" column, select "Group By".
    Capture6.PNG
  4. Set "Group by" like below. You will get expect result.
    Capture3.PNG
    Capture4.PNG

Regards,

Sorry, I don't have much knowledge about the Service, we'll need someone else's help on that.

 

Thanks

arify
Microsoft Employee
Microsoft Employee

(You may want to ask the new question in the Service subforum)

Habib
Responsive Resident
Responsive Resident

Not possible in Power BI currently. There is idea already logged for this. 

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/10948962-matrix-measures-or-value...

 

 

 

Vvelarde
Community Champion
Community Champion

The more closest is use a Multicard Row.




Lima - Peru

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.