Forum Discussion
Combine multiple measures in a single matrix
- 4 years ago
Anonymous Perhaps take a look at "Show measures on rows" functionality or you may need to go down the path of a customer matrix hierarchy. I'll have to see if I can find some time to play with it. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/963588#M428
Here is one way:
1) Create a new unrelated table with the following using "Enter Data" in the ribbon. I've called the table "RowTable"
2) Create the following measures:
Lowest =
IF ( SELECTEDVALUE ( RowTable[Row] ) = "Sales", [Min Sales], [Min Cost] )
Highest =
IF ( SELECTEDVALUE ( RowTable[Row] ) = "Sales", [Max Sales], [Max Cost] )
3) Create the matrix using the Row table as rows and the Category as columns. Add both the new measures to the values bucket and you will get:
I've attached the sample PBIX file
The solution works beautifully. There's only one minor thing. If possible I would like to sort the measures on the, not in matrix included, Index field. I guess this isn't possible, but if you know a way let me know :).
- PaulDBrown4 years ago
Community Champion
Sorry, I'm not sure what you mean. Can you post a depiction?