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
vjnvinod
Impactful Individual
Impactful Individual

order Issue

Hi Team,

 

here is my table for which i see the order is not picking up correctly, i need this to be reflected as P1, P2..orderissue.PNG

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

unfortunately the sorting is correct, but not as you expected 🙂

 

This is due to the fact that by default the sorting is alphanumerical, this considers P10 smaller than P2.

There is an easy solution, just make all your periods 3 digits like so PXX:

this makse P1 to P01 and P2 to P02 and leaves P10 as P10.

A solution that requires a little more effort is described here:

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-butto...

Hopefully this provides you some ideas to solve your issues.

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

unfortunately the sorting is correct, but not as you expected 🙂

 

This is due to the fact that by default the sorting is alphanumerical, this considers P10 smaller than P2.

There is an easy solution, just make all your periods 3 digits like so PXX:

this makse P1 to P01 and P2 to P02 and leaves P10 as P10.

A solution that requires a little more effort is described here:

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-butto...

Hopefully this provides you some ideas to solve your issues.

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi,

Sorry for a response 3 years later to this!

 

Do you know what the best way is if I have more than 1 calendar year but have financial periods as well? Sorting to 3 digits has really helped but wondering if there is a way to get it 2021 P1 followed by 2021 P2 etc... at the moment my chart does P01 for 2021 then 2022 then P02 2021...2022...

 

Any help is appreciated!

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.