Forum Discussion
Matrix multiple Sort columns
- 8 years ago
You may try using ISONORAFTER Function to add a measure.
Measure = VAR e = SELECTEDVALUE ( Table1[Employee] ) VAR c = [TotalCount] VAR t = SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Employee], Table1[Customer] ) RETURN COUNTROWS ( FILTER ( t, ISONORAFTER ( Table1[Employee], e, DESC, [TotalCount], c, ASC ) ) )
You may try using ISONORAFTER Function to add a measure.
Measure =
VAR e =
SELECTEDVALUE ( Table1[Employee] )
VAR c = [TotalCount]
VAR t =
SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Employee], Table1[Customer] )
RETURN
COUNTROWS (
FILTER ( t, ISONORAFTER ( Table1[Employee], e, DESC, [TotalCount], c, ASC ) )
)
- dsaladi7 years agoRegular Visitor
Hello,
Can you provide me a .pbix file? I really appreciate it. Thanks.
- twagnerSME1 year agoRegular Visitor
I have another solution.
Until the control is fixed to allow for multiple sorting patterns I would suggest the following.
Create a column with the fields you want sorted in the order you want sorted.
So in my example my matrix is grouped by Unit. But I want my sort to be Unit and Days till launch.
So creating a column as so
SortColumn = Data[Unit] & ":" & Data[DaysTillLaunch]
But in my case Unit is a text and [DaysTillLaunch] is an integer, (Cannot convert value error)
so I have to convert the [DaysTillLaunch] to a text by using the Format to give me leading zeros.
SortColumn = Data[Unit] & ":" & FORMAT(Data[DaysTillLaunch],"000000")
Then I add the sort column to values and sort ascending.
It's clumsy but it works.