Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
My table contains 4 columns and I am aiming to create a table such that I can show the min, max, avg, and weighted avg of 3 columns(4th column has values that help calculated the weighted average formula.
The rows should say Min, Max, Avg etc and columns should say the Column names. It's like a pivot table in Excel but I'm not able to replicate it in powerBI.
The end result looks like this table from excel I have attached. Appreciate any guidance on this
Solved! Go to Solution.
Hello @lbuzz
you can create a new query where you are using Table.Profile to create a new table with the desired data. Here an example code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTICYlOlWJ1oIKmjZAHEJmCeMZAFwbGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", Int64.Type}, {"C", Int64.Type}}),
TableProfile= Table.Profile(#"Changed Type")
in
TableProfile
The output of this function you can easily show in a table-visual
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @lbuzz
you can create a new query where you are using Table.Profile to create a new table with the desired data. Here an example code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTICYlOlWJ1oIKmjZAHEJmCeMZAFwbGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", Int64.Type}, {"C", Int64.Type}}),
TableProfile= Table.Profile(#"Changed Type")
in
TableProfile
The output of this function you can easily show in a table-visual
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
@lbuzz
To have the format you desire, you need to use a MATRIX visual and go to Value Property and set the show on Row to ON
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hello thank you so much for the early reply
But if I use a matrix and drop the values with Row selection, I end up seeing a top to bottom structure vs a pivot matrix style. If somehow I could Fix the keywords Min Max,Avg on rows and every new column A,B,C goes into new column, that'd really help me
User | Count |
---|---|
25 | |
13 | |
12 | |
11 | |
8 |
User | Count |
---|---|
44 | |
27 | |
21 | |
16 | |
12 |