# Type alias PivotRowsSort
PivotRowsSort:
object
Sorting configuration for pivot "rows".
This configuration allows sorting pivot "rows" either by their data or by data in a specific "values" column.
# Example
Examples of sorting configurations for various scenarios:
(1) Row sorted in ascending order by its data:
{ direction: 'sortAsc' }
(2) Row sorted in descending order by data in the first "values" column (index 0):
{
direction: 'sortDesc',
by: {
valuesIndex: 0,
}
}
(3) Row sorted in ascending order by data in the second "values" column (index 1) under the "columns" values of "Female" (for Gender) and "0-18" (for AgeRange):
{
direction: 'sortAsc',
by: {
valuesIndex: 1,
columnsMembersPath: ['Female', '0-18']
}
}
# Type declaration
# by
by?: object
Sorting target configuration, allowing sorting "rows" by the data in a specific "values" column
#
by.columnsMembersPath
columnsMembersPath?: (
number
|string
)[]Path to the target column if selected "columns" items (dimensions) are involved
#
by.valuesIndex
valuesIndex?:
number
Index of the target "values" item (measure)
# direction
direction: SortDirection
Sorting direction, either in Ascending order, Descending order, or None