Forum Discussion
Sorting a text column non-alphabetically without circular reference
- 1 year ago
hello markmsc
matrix visual has fewer sort option.
you can tweak this sort by various way.
1. define using number as prefix
2. if the prefix looks ugly, then you can create multiple measures. You can set placement by ordering those measures in value column matrix visual.
Hope this will help.
Thank you.
hello markmsc
i dont know how your data looks like so you got circular error.
But re-define then sort based on the defined value should be do the trick.
for example : in new calculated column, using if statement
- unsorted
- sorted
put the previously created column in tooltip, then sort the visual with that value
Hope this will help.
Thank you.
- markmsc1 year ago
Resolver I
Hi Irwan -- Thank you for the suggestion. That is clever. Unfortunately, it seems to be one that would only work for a chart visual; I am using (and did not mention this in my first post) a matrix viz. Size is the main column in the matrix (let's say that the values shown for each size are a count of the inventory in the size). So I want my columns to sort Extra Small > S > M > L > Extra Large.
As for the circular refernce, I tried making a calculed column, let's call it SizeSort:
SizeSort = SWITCH([Size],"Extra Small", 1,
"Small", 2,
....
)
Then I set the sort column for Size in the semantic model to be SizeSort. But of course Size can't be sorted by a column that itself refers back to Size.
- Irwan1 year ago
Super User
hello markmsc
matrix visual has fewer sort option.
you can tweak this sort by various way.
1. define using number as prefix
2. if the prefix looks ugly, then you can create multiple measures. You can set placement by ordering those measures in value column matrix visual.
Hope this will help.
Thank you.
- markmsc1 year ago
Resolver I
Thank you. I did end up just prefixing with a number. Not ideal, but it gets the job done for now. I appeciate your thoughtful suggestions.