Forum Discussion
Sorting a string based on the measure
Hi,
I have a measure called Balance Due which is concat of another measure called Total Balance Converted and the currency column.
Now this Balance Due is a string but I want to be able to sort this based on the number in a matrix visual.
In the matrix I will not have the Total Balance Converted and the Currency fields. I have added it just for reference.
How can I do this?
Thanks!
Hi, sprakash99
As a workaround, you can consider hiding these two columns directly in the matrix after the field 'Balance Due' is sorted based on field 'Total Balance Converted'.
(Turn off the 'word wrap' option in the 'Format' pane of this matrix -> Reduce the column width to 0)
Best Regards,
Community Support Team _ Eason
4 Replies
- v-easonf-msftCommunity Support
Hi, sprakash99
As a workaround, you can consider hiding these two columns directly in the matrix after the field 'Balance Due' is sorted based on field 'Total Balance Converted'.
(Turn off the 'word wrap' option in the 'Format' pane of this matrix -> Reduce the column width to 0)
Best Regards,
Community Support Team _ Eason - PC2790Community Champion
- sprakash99Frequent Visitor
Hey PC2790
That's a great article. But I want the end user to be able to sort the column in ASC or DESC rather than having a static table that is sorted by default.
Is there a way to do that?- PC2790Community Champion
You can try creating a new measure for sorting based on "Total Balance Converted" and bring that to your matrix for giving the ends users a provision to do the sorting.Something like this:
sort desc = RANKX(ALL(Table),CALCULATE(MAX(Table[Total Balance Converted])),,DESC,Dense)I hope this will fulfil your requirement