Forum Discussion
Sorting specific column in matrix visual
- 6 months ago
Create a measure that calculates Leads for ContactGroup A:
Sort Leads A = CALCULATE( [Leads], 'ContactGroup'[ContactGroup] = "A" )Add this measure to the matrix:
-
Put it in Values
-
Turn off visibility:
-
Set column width very small, or
-
Rename to blank, or
-
Hide via conditional formatting (font = background)
-
Then: Matrix → More options (…) → Sort by → Sort Leads A
-
Hi cn4422
Sorting by different columns is only possible when those columns aren’t coming from a dimension. Once a measure is broken down by a dimension (like categories), individual sorting per category isn’t supported. The visual will sort using the total column, which means the total must reflect the value of the specific category rather than the aggregate of all categories. Also, adding a measure as a tooltip has generally not been supported for matrix and table visuals (it works only with some other visuals).
Sample measure to return the value of A at the total column.
new measure =
IF (
NOT ( HASONEVALUE ( 'table'[ContactGroup] ) ),
CALCULATE ( [leads measure], KEEPFILTERS ( 'table'[ContactGroup] ) = "A" ),
[leads measure]
)
Of course, this means that the total shows the value of A only.