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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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

(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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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