Hey,
Can we set default sorting order as "ascending" for all the fields.
If I don't want to set sorting order of selected fields on event every time.
Hello Kapil,
Thank you for reaching out to us.
Could you please provide us with more details on your use case:
It would greatly help us.
Looking forward to hearing from you.
Kind regards,
Nadia
# "Compact" form AND some time "Flat" form
# Sorted members(Rows/Columns), Not a value.
Hello Kapil,
Thank you for providing the details.
We recommend using the defaultHierarchySortName
property of the Options Object. To set the default sorting order as "ascending" for all the fields, you can use the following code:
report: {
...,
options: {
defaultHierarchySortName: "asc"
}
}
You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/cdh2pwo8/
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Its not working, any other option?
Hello,
Thank you for the response.
We could not reproduce the issue with the defaultHierarchySortName: "asc"
on our side. Please edit the JSFiddle from our previous response to show the problem. It would greatly help us.
Looking forward to hearing from you.
Kind regards,
Nadia
Adding code in JsFiddle
Some fields like: Market, Brand, Category, Ads, Month, Quarter not getting sorted default in Row/column. Let me know any other configuration/code required.
Hello,
Thank you for providing us with the example.
It seems that in your report configuration, you have the measures sorted:
"sorting": {
"row": {
"type": "desc",
"tuple": [],
"measure": {
"uniqueName": "AdBlockId",
"aggregation": "distinctcount"
}
},
"column": {
"type": "desc",
"tuple": [],
"measure": {
"uniqueName": "AdBlockId",
"aggregation": "distinctcount"
}
}
},
Please note that it is only possible to sort data by members or measures. This means if you remove the measures sorting, the members will be sorted in ascending order: https://jsfiddle.net/flexmonster/kmz7u52t/2/
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Hello,
Hope you are doing well.
We were wondering if you had a chance to check the suggested solution. Could you please let us know if it works for you?
Looking forward to hearing your feedback.
Kind regards,
Nadia
Its working now, thanks for your help
Hello Kapil,
Thank you for the response.
We are glad to hear that it works for you!
As always, feel free to contact us in case other questions arise.
Kind regards,
Nadia