Forum Discussion

raddis's avatar
raddis
Regular Visitor
2 years ago
Solved

Getting numbers into numerical order

Im rather new at power bi.

Trying to get the 1001-10,000 down below the 501-1000. I cant change the type from text to whole number. It wont allow it. 

How can I get this in the correct order? I formulated this from excel. Its pulling the formulated column from excel. Should I do the formulation instead in power bi? 

 

Hope that makes sense. 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi raddis 

     

    Kaviraj11 Thank you very much for your prompt reply. Allow me to offer another thought here.

     

    First, make sure your data order is correct by loading the data into desktop. Select tranform data to go into power query.

     

    Add the index column.

     

     

     

    Create a slicer visual. Click on the column you want to sort by and in the column tools, click sort by column and select index.

     

     

    Here is the result.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

2 Replies

  • Step 1

     Create a Custom Table with all the category either manually in Power Query or read from source.

    Create a new column beside and provide the number in the order you want to arrange.

     

    Step 2

    Create a relationship between the column in actual table to the custom sort table

    Step 3

    Create a column in Actual table with an expression.

    Sort order = RELATED(CustomSortTable[Sort])

     

    Step 4

    Select the column you want to sort, and a “Column Tools” menu bar will appear at the top. Now Select the “Sort by column” and select the sort order column.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi raddis 

     

    Kaviraj11 Thank you very much for your prompt reply. Allow me to offer another thought here.

     

    First, make sure your data order is correct by loading the data into desktop. Select tranform data to go into power query.

     

    Add the index column.

     

     

     

    Create a slicer visual. Click on the column you want to sort by and in the column tools, click sort by column and select index.

     

     

    Here is the result.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.