Forum Discussion
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
Anonymous
pls see if this is what you want
4 Replies
- ryan_mayuSuper User
- rajendraongole1Super User
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. - AnonymousNot applicable
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)
- rajendraongole1Super 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.