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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
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. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

no any. This experience found from parctice.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors