Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sprakash99
Frequent Visitor

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?

Screenshot 2022-05-16 at 3.42.21 PM.png

Thanks!

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community 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

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community 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

PC2790
Community Champion
Community Champion

Hey @sprakash99 ,

 

See if this article turns out to be helpful

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?

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.