Forum Discussion
anshusaketsingh
2 years agoFrequent Visitor
Dynamic sorting for matrix column headers based on Descending order of Measure
Hi Experts So I am using a field parameter as column and want it to sort dynamically based on distinct count of order ids. For eg, I want the below table to sort dynamically with Standard Class ...
Anonymous
2 years agoNot applicable
Hi anshusaketsingh ,
The link can’t be opened.
Please try the following methods:
1.Create the simple table.
2.Create the new column to sort desc.
Desc order =
VAR stat = 'Table'[State]
RETURN
RANKX(
FILTER('Table', 'Table'[State] = stat), 'Table'[ID], ,DESC, Skip
)
3.Drag the field into the matrix visual. Select the Class field, and choose sort by column feature and select new column.
4.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
anshusaketsingh
2 years agoFrequent Visitor
Thanks a lot for your response Anonymous
The solution unfortunately doesn't seem to wirk because the ids are not unique as in your with my workbook.
Also its parameter rather than column that I am using.
Below is how my original data looks like -
Attached the workbook too-
Superstore Reference Workbook.pbix