Forum Discussion

TomBI's avatar
TomBI
Frequent Visitor
4 years ago

Sort Matrix first on category name, second on highest value

Hi, 

 

I have created a Matrix with 

- one value, the Qty 

- two row dimensions, the category and the item id

 

There are three categories, A (most important), B (second most important) and C (other). There are multiple item id's within those categories. 

 

I want my matrix to be sorted on two levels:

- First on category level (I use an index column to sort accordingly)

- Second on the items id's with the highest value within that category

 

The problem is that when I rank on highest value, the "Other" category shows up first, because it has the higest total value. But if I rank on the Category, the items within that category also rank alphabetically. 

 

 

Is there any solution this problem? It may involve DAX.  

 

Thanks!