Forum Discussion

160475's avatar
160475
Helper I
3 years ago
Solved

sorting columns

dears,

good day!! 

 

in my raw data i have this 

where i have column batch from 1 to 48 and batch sort is the index sort 

when i apply this to power bi it give me this sort 

can anyone help me ? 

 

thank you!! 

  • Check the datatype of your 'batch sort' field. It should be Number.

    Usually if the data type of sort field is Text, then it sorts as you have shown in the screenshot

5 Replies

  • 160475 , seem like data type is test, make it number

     

    The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.

  • HI 160475 

     

    It seems 1, 11, 2 are sorted as Text, please ensure the data type of the column is number. 

  • ghoshabhijeet's avatar
    ghoshabhijeet
    Solution Supplier

    160475  Thanks for sharing your query. For sorting the data correctly follow the steps below:

    1. Goto the data view

    2. Change the data type of BatchSort to Number

    3. Select the column (i.e. BATCH) and then click on the dropdown "Sort by column"

    4. Select BatchSort column from the drop down

    5. Now, goto the report view and the data should be sorted as expected in the table visual

     

    NOTE: If the data is still not sorted, then you need to perform additional step, on the table visual select the Sort By as shown in the below snapshot.

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍

     

  • Check the datatype of your 'batch sort' field. It should be Number.

    Usually if the data type of sort field is Text, then it sorts as you have shown in the screenshot