Forum Discussion

carpetwotsit's avatar
carpetwotsit
Regular Visitor
8 years ago
Solved

Number sorting in text filter

Hi

 

I have a text filter which filters by graphs by store:

 

 

And a graph which plots each store against a value:

 

To stop Power BI from treating the stores as integers and summarizing the values, I've made the 'store' column a text column. Is there a way to sort the values within the filter as if they are numerical? Rather than 10, 102, 105, 106 it would be 10, 11, 102, 105, 106 etc. I can sort the filter by changing the 'store' column from text to whole number but it causes this to happen:

 

 

I've tried to change the default summarization but I don't have the option to (greyed out).

 

Thank you

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hey carpetwotsit

     

    I would recommend creating a calculated column that converts the store number to text like:

     

    StoreText = FORMAT(Test[Store], "####")

    Then you can go to the Data tab and sort the StoreText column by Store. Then by putting StoreText in the axis of your visualization, you will have the proper functionality. Use the Store in any slicers though.

     

     

    Hope this helps,

    Parker

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey carpetwotsit

     

    I would recommend creating a calculated column that converts the store number to text like:

     

    StoreText = FORMAT(Test[Store], "####")

    Then you can go to the Data tab and sort the StoreText column by Store. Then by putting StoreText in the axis of your visualization, you will have the proper functionality. Use the Store in any slicers though.

     

     

    Hope this helps,

    Parker