The goal of this example is to provide automatic sorting of an attribute in report visuals. Specifically, the United States regional organizations should appear next to one another by default in visuals. By default, the Central Division (a part of the USA), appears between Canada and France given the alphabetical sorting of text columns:
- Add a Table.Sort() expression to the import query for the Organization dimension.
- The columns for the sort should be at the parent or higher level of the hierarchy.
- Add an expression with the Table.AddIndexColumn() function that will add a sequential integer based on the table sort applied in step 1.
- With this expression, ...