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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
HarshuGangurde
Frequent Visitor

How to Sort Numerical Measure having text data type

Hello All,
Kindly help me on below issue.
I want to sort this measure by ASC or DESC order but the problem is that measure having text datatype because of decimal formatting.
How can we solve this problem?
LY Actual Value_L3 = var _format= CALCULATE([Actual Value],FILTER('Master Calendar','Master Calendar'[IS Last Fiscal Year]="Yes"))+0 return FORMAT(_format, SWITCH( SELECTEDVALUE('Number Format'[Decimal Place],"#,#0.00"), 0,"#,#0", 1,"#,#0.0", 2,"#,#0.00", 3,"#,#0.000" ) )

4 REPLIES 4
PC2790
Community Champion
Community Champion

Hey @HarshuGangurde ,

 

You can try and sort it by another column which is Number by using Sort by Column.

To do this select your measure in the fields list and then on the Modeling Tab select Sort by Column and select the Number Field.

PC2790_0-1658916718637.png

MahyarTF
Memorable Member
Memorable Member

Hi,

Would you please share a sample data,

I created the sample data for my self, and it is worked :

MahyarTF_0-1658916379150.png

 

Mahyartf

Hello,

Could you please share your sample data.

 

Thanks.

 

I put as a screen shot in my previous post

Mahyartf

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.