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
Omid_Motamedise
Super User
Super User

Type Any in Power Query

When you load data from Excel into Power Query, removing the "Change Type" step results in the columns being treated as "Any" type. If we sort a column of type "Any," Power Query applies different sorting logic depending on the values in the column. If the values are numbers, it sorts them as numbers; if the values are text, it sorts them as text; and if the values are dates, it sorts them as dates.

I’m wondering what happens in practice in this case. Does Power Query first detect the data type and then sort based on the detected type, or is there a general rule for sorting data when it's in "Any" type?


If my answer helped solve your issue, please consider marking it as the accepted solution.
2 ACCEPTED SOLUTIONS

no any. This experience found from parctice.

View solution in original post

v-ssriganesh
Community Support
Community Support

Hi @Omid_Motamedise,

I hope you're doing well! I wanted to follow up on your query regarding Power Query and the behaviour of the "Any" data type.

As @ZhangKun correctly pointed out, Power Query sorts values based on the specific type of each value instead of the column type when dealing with "Any" values. This sorting behavior is based on practical experience, and unfortunately, there isn’t a specific Microsoft document that outlines it.

Have you resolved your issue with sorting in Power Query, or is there anything else related to your query that you need assistance with? If this resolves your issue, please accept it as a solution and leave a "Kudos" so other members can find it more easily.

Thank you.

View solution in original post

4 REPLIES 4
v-ssriganesh
Community Support
Community Support

Hi @Omid_Motamedise,

I hope you're doing well! I wanted to follow up on your query regarding Power Query and the behaviour of the "Any" data type.

As @ZhangKun correctly pointed out, Power Query sorts values based on the specific type of each value instead of the column type when dealing with "Any" values. This sorting behavior is based on practical experience, and unfortunately, there isn’t a specific Microsoft document that outlines it.

Have you resolved your issue with sorting in Power Query, or is there anything else related to your query that you need assistance with? If this resolves your issue, please accept it as a solution and leave a "Kudos" so other members can find it more easily.

Thank you.

ZhangKun
Super User
Super User

in practice, u will be found that powerquery first checks the type of value(not column type), and then sorts the values of same type together. This means that there is a priority between the different types.

Thanks, @ZhangKun, for the response.
Is there any reference in Microsoft Document to explain such behavior of commands over the column in type any?


If my answer helped solve your issue, please consider marking it as the accepted solution.

no any. This experience found from parctice.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.