newMeasureSort()
Home > @gooddata/sdk-model > newMeasureSort
newMeasureSort() function
Creates a new measure sort - sorting the result by values of the provided measure.
Signature:
export declare function newMeasureSort(measureOrId: IMeasure | string, sortDirection?: SortDirection, attributeLocators?: IAttributeLocatorItem[]): IMeasureSortItem;
Parameters
Parameter |
Type |
Description |
---|---|---|
measureOrId |
IMeasure | string |
measure to sort by |
sortDirection |
(Optional) asc or desc, defaults to "asc" | |
attributeLocators |
(Optional) optional attribute locators |
Returns:
new sort item
Remarks
The measure can be either specified by value or by reference using its local identifier.