cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Combine multiple measures in a single matrix

I have a product table:

On this table I have 4 measures:

1. Lowest Sales Price = MIN([Sales price])
2. Highest Sales Price = MAX([Sales price])
3. Lowest Cost Price = MIN([Cost price])
4. Highest Cost Price = MAX([Cost price])

I want to see the results in one single matrix:

I'm struggling with finding a way to accomplish this. I guess it can be done with DAX table functions?

1 ACCEPTED SOLUTION
Super User

@__Marc__ 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/...

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
5 REPLIES 5
Community Champion

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

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Frequent Visitor

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 :).

Community Champion

Sorry, I'm not sure what you mean. Can you post a depiction?

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Frequent Visitor

Great! Thank you!

Super User

@__Marc__ 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/...

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors