Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Urgent help needed on Sorting columns

Hi All,

 

Please help to solve below sorting columns. I am uable to get it exact sorting based on my requirement.

 

The default sorting in Power BI is only one column is giving sort. But as per the requested requirement is. 

Sort Order like: 

P Name should be Alphabetical Order (ASC)

Date & Time (ASC)

P Number (ASC)

 

Here is the below image currently working on requirement report. I tried Sort Order requirement in Power BI, but default sort is coming. 

 

 

Here is the Data to work on Power Bi report. Please help

 

P Number Date & Time P Name
2625745 2025-08-04 15:22:54 iwanato
1933156 2025-08-04 19:46:09 ku rkazu
3285211 2025-08-05 10:59:29 guanwen
3274109 2025-08-09 13:01:00 guanwen
2025-08-05 11:48:35 aokiyuy
2404383 2025-08-05 11:49:37 n•gant3
2458186 2025-08-05 11:52:04 kudoush
9017412 2025-08-05 12:36:57 mamimiy
9017.413 2025-08-05 123657 mammy
9017414 2025-08-05 12:36:57 mamimiy
9017415 2025-08-05 12:36:57 mammy
9017418 2025-08-05 12:36:57 mammiy
1711824 2025-08-05 13:58:04 mammy
3410305 202508-05 13:58:04 mamimiy
3524783 2025-08-05 13:58:04 mammy
9017449 2025-08-05 14:29:12 iwanato
2025-08-05 18:19:09 hagiwto
2643916 2025-08-05 23:49:01 kudoush
1961528 2025-08-0612:.59:55 mammy
2694512 2025-08-0612:59:55 mammiy
3170848 2025-08-0612:59:55 mamimiy
3382769 2025-08-061259:55 marnimiy
3924436 2025-08-0613:18:09 shimkaz

 

 

4 Replies

  • Hi Anonymous  - If sorting does not apply correctly, ensure there are no duplicate values affecting order.

    Ensure Data Types Are Correct

    Open Power Query Editor (Transform Data).
    Check that:
    P Name is Text.
    Date & Time is Date/Time.
    P Number is Whole Number.
    Sort in Power Query (Recommended for Complex Sorting)

    In Power Query Editor, sort columns in this exact order:
    P Name (A → Z)
    Date & Time (Oldest → Newest)
    P Number (Smallest → Largest)
    Click Close & Apply to save changes.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rajendraongole1 

     

    Data types are correct for these 3 columns, but still the same issue as excepted sorting is not coming as per the requirement.

    Sort Order like: 

    P Name should be Alphabetical Order (ASC)

    Date & Time (ASC)

    P Number (ASC)

    • rajendraongole1's avatar
      rajendraongole1
      Super User

      Hi Anonymous - can you try below approach by creating new column sortkey as power bi sometimes ignores multiple sort orders in visuals. To force it:

      SortKey = P_Name & FORMAT([Date & Time], "YYYYMMDDHHMMSS") & FORMAT([P Number], "0000000")

      Go to Model View → Select the Table.Click "Sort by Column" → Choose "SortKey".Use this new column for sorting in your table visual.

       

      Please check and confirm.