Forum Discussion

carlom_iptech's avatar
carlom_iptech
Frequent Visitor
2 years ago
Solved

Numeric Sorting of Alphanumeric

Is there a setting to sort alphanumerically? I know there's a sort by, but is there a setting on PowerBI Desktop to sort things numerically? This the default sorting on File Explorer and I'd like to replicate it. 

 

I want this sorting:

 

1

D1

D2

D9

D10

D100

D200

D999

RandomText

Sausage

 

 

Not:

 

1

D1

D10

D100

D2

D200

D9

D999

RandomText

Sausage

  • Anonymous's avatar
    Anonymous
    2 years ago

    HI carlom_iptech,

    Text values can not use the numeric mode as the column sort order.
    For your scenario, you can extract the number value part to create a new calculate column to use it as 'sort order' of your colum or create new table with raw field values and index field.
    Then you can use 'sort by column' property to setting the column sort order.

    Custom Sorting in Power BI 

    Regards,

    Xiaoxin Sheng

2 Replies

  • this is the text type, not number. So that's why you can not sort numerically.

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI carlom_iptech,

    Text values can not use the numeric mode as the column sort order.
    For your scenario, you can extract the number value part to create a new calculate column to use it as 'sort order' of your colum or create new table with raw field values and index field.
    Then you can use 'sort by column' property to setting the column sort order.

    Custom Sorting in Power BI 

    Regards,

    Xiaoxin Sheng