Nested sorting refers to sorting a dataset or chart by multiple columns or fields. This varies from regular sorting, which sorts by one field.
In nested sorting, the amount of fields/columns which can be sorted by can be endless, however the order in which the tables/charts are sorted is in a hierarchy.
This enables sorting at a more granular level, providing further analysis across one criteria and then another across a group. This can provide easy comparison between groups within a field. For example, identifying sales values for a particular category of products, over a certain time period, by a certain employee. This provides ability to identifying trends, seasonal variations and high preforming categories, which enables things like targeted marketing and new strategies.
There are two ways in PBI to nested sort. The first way, only available in tables, is very simple and only requires clicking on fields. The order of the hierarchy should be determined and value which they should be sorted chosen. Then, starting at the highest level of granularity, hold SHIFT and click down the hierarchy which you would like to sort by. Finally, whilst still holding shift, click the values you want to sort by. When clicking on string fields, they will be ordered by default in alphabetical order.
To do more complex sorting within the fields, for example giving each category a specific order opposed to alphabetic or asc/desc, a field must be created from which PBI will order the fields. This is a common method over various data programs. Using Power Query or DAX to give a numeric value for each row in the desired order, then sorting by this column to get the desired sort order.
There are many ways to sort in DAX and PQ, using different functions and methods. The important thing to remember is that the DAX and PQ calculations can filter values, group values, order by different measures and provide different methods of ranking. All of these can be used to give the desired sort.