Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Sort the table order in Power BI table visual

I have the below table visual in Power BI with filed values like "ORR 1", ORR 2, etc.,

 

I need to sort it in ascending. When I do it ORR 11 comes after ORR 1 instead of ORR 2. How to tackle this ?

 

3 Replies

  • Hi Anonymous 

     

    It's obvious, try formatting the secong part of your ORR column by adding leading digits in order to get ORR 01 instead of ORR 1

    Did it work ? Mark it as a solution to help spreading knowledge.

    A kudos would be appreciated  

    • DataVitalizer's avatar
      DataVitalizer
      Icon for Super User rankSuper User

      Hi Anonymous 

       

      You can create a new calculated column and use it in your visual

      ORRSorting = LEFT(Table[ORR],3)&" "&FORMAT(CONVERT(RIGHT(Table[ORR],LEN(Table[ORR])-3),INTEGER),"0000")

      Did it work ? Mark it as a solution to help spreading knowledge.

      A kudos would be appreciated