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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
intrasight
Helper IV
Helper IV

sorting problem/question

I have a table visual. I have a text field in the first column and a number field in the second column. I want the table sorted by the first column alphabetically and then by the second column numerically. But instead the second column is being sorted alphabetically. How to I change the sort type of that second column to be numeric?

1 ACCEPTED SOLUTION

I effectively did that. I added two new entries into the existing Table.TransformColumnTypes. I don't get why it doesn't do that automagically. More specifically, if the underlying "Transform file from X" query makes it numeric, why does the final table have the type as "any".  And even the underlying query makes the numeric a decimal whereas clearly it should be integer.   I'll report these as bugs through the correct channels.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @intrasight,

 

As you said, when sorted column is numeric type, the sort function still displayed "Sort ASC/DESC". I think it's a display issue, even if the sorted column is number, the order function also works on it.(perhaps they just forget to dynamic changing display text :smiley happy:)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Dog
Responsive Resident
Responsive Resident

Hi @intrasight

 

it sounds like you just need to adjust the column format to that of a number type. 

the visuals tend to feed of that information. 

 

D

I effectively did that. I added two new entries into the existing Table.TransformColumnTypes. I don't get why it doesn't do that automagically. More specifically, if the underlying "Transform file from X" query makes it numeric, why does the final table have the type as "any".  And even the underlying query makes the numeric a decimal whereas clearly it should be integer.   I'll report these as bugs through the correct channels.

Go to Edit query and change second colome type to numeric.

2017-04-26_13-12-00.jpg

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.