Forum Discussion
How to custom sort column values in matrix visualisation
- 2 years ago
Anonymous , if the selection is a column you need to have a sort column, probably create that in the power query .
mark selection order as sort column of selection 1 in column tools
selection Order = if [Selection] = "Tax" then 1
else if [Selection] = "Fine" then 2
else if [Selection] = "Gross %" then 3
else nullIn DAX to avoid circular dependency have columns like , mark selection order as sort column of selection 1
selection 1 = 'demo'[Selection]
selection Order =
SWITCH(
'demo'[Selection],
"Tax", 1,
"Fine", 2,
"Gross %", 3,
BLANK() -- This will return a blank if the value does not match any of the above
)In case they are from a calculation group or field parameter, you can control order there or have a sort column like the above
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Anonymous , if the selection is a column you need to have a sort column, probably create that in the power query .
mark selection order as sort column of selection 1 in column tools
selection Order = if [Selection] = "Tax" then 1
else if [Selection] = "Fine" then 2
else if [Selection] = "Gross %" then 3
else null
In DAX to avoid circular dependency have columns like , mark selection order as sort column of selection 1
selection 1 = 'demo'[Selection]
selection Order =
SWITCH(
'demo'[Selection],
"Tax", 1,
"Fine", 2,
"Gross %", 3,
BLANK() -- This will return a blank if the value does not match any of the above
)
In case they are from a calculation group or field parameter, you can control order there or have a sort column like the above
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Thanks amitchandak for the solution there.
This does help me sort the Selection column. However, when I put that selection column under Row section of matrix visualisation it still looks unsorted. It does not come up in a sequence in the matrix visualisation as Tax, Fine and Gross% on respective rows of the visual.
How can I achieve that?