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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Anonymous
Not applicable

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

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.

VP
Most Valuable Professional
Most Valuable Professional

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

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.