The default option is the simplest form. It allows the user to sort according to any one field and direction (ascending or descending). The user selects the direction and field from the more options menu.
To enable default sorting, add the following code to your capabilities.json file:
JSON
"sorting": {
"default": { }
}
Implicit sorting
Implicit sorting allows you to pre-define a sorting array using parameter clauses, that describes sorting for each data role. The user can't change the sorting order, so Power BI doesn't display sorting options in the visual's menu. However, Power BI does sort data according to specified settings.
To enable implicit sorting, add the implicit clauses to your capabilities.json file
clauses parameters can contain several objects with two parameters each:
role: Determines DataMapping for sorting
direction: Determines sort direction (1 = Ascending, 2 = Descending)
Demonstrate methods and best practices that align with business and technical requirements for modeling, visualizing, and analyzing data with Microsoft Power BI.