rows: [
{
uniqueName:"[Dim GL Codes Groups].[GL Category]",
filter: {
members: [
"[Dim GL Codes Groups].[GL Category].[All].UNKNOWNMEMBER"
],
negation:true
},
sort:"desc"
},
],
I have arrange row values in sorted order
Example row values::
sortOrder: ["REVENUE", "EXPENSES","MANAGEMENT FEE","VALET OPERATING EXPENSES"],
Please suggest us exact approach to sort
Expected oreder is: ["REVENUE", "EXPENSES","MANAGEMENT FEE","VALET OPERATING EXPENSES"],
Hello,
Thank you for reaching out to us.
We would like to explain that the sortOrder
option is supported only for OCSV, CSV, and JSON data source types.
For your case, we kindly suggest defining your own sorting method: https://www.flexmonster.com/doc/sorting/
With such an approach you can cover a wider range of use cases.
Please let us know if this helps.
Best Regards,
Vera
is there any possibility to sort data form SSAS data source?
Hello,
Thank you for your question.
Yes, it is possible to sort data using the sortingMethod() API call.
Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/5Lfcpabw/
Please notice that the sort
property is not specified for the field:
"slice": {
"rows": [
{
"uniqueName": "[Product].[Category]"
}
]
...
}
The desired order is set via the sortingMethod()
API call:
//Specify the desired order
var sortOrder = [
"Bikes",
"Clothing",
"Accessories",
"Components"
];
pivot.sortingMethod("[Product].[Category]", function (a, b) {
return sortOrder.indexOf(a)-sortOrder.indexOf(b);
});
Please let us know if this works for you.
You are welcome to contact us in case of questions.
Best Regards,
Vera