Is there a way I can define a custom sort for my i...
# gooddata-platform
j
Is there a way I can define a custom sort for my insights ether in the designer or using gooddata.ui?
j
Hi Justin, I am not sure what you mean by custom sort so my answer may be bit longer. If you need to order attribute in other sequence than alphabetically (e.g. Project Status attribute with values New, In progress, Done in chronological order rather than alphabetical), you can use “sort label” in logical data model (e.g. additional label of Status attribute with integer data type containing ordinal number of the status which is defined as “sort label”). See following article from help for details: https://help.gooddata.com/doc/growth/en/data-integration/data-modeling-in-gooddata/update-a-logical-data-model#UpdateaLogicalDat[…]attributebyalabel Sorting criteria for table are flexible (you can chose any column for sorting in Analytical Designer), but some charts come with predefined sorting, either by attribute value or metric value (e.g. bar chart is ordered by metric value while column chart by attribute value). You can expect improvement in this area in future as chart sorting is on GD roadmap. Many visual components of GoodData.UI have sortBy property and specification of sorting criteria is supported by GoodData execution APIs. See following article for some details about sorting: https://sdk.gooddata.com/gooddata-ui/docs/result_specification.html#sorting I hope it helps
j
@Jakub Sterba I dont seem to have the option to set a sort label in gooddata.cn in the LDM, is this not supported in CN or have I possibly set my LDM up wrong?
a
Hi @Justin Unverricht. You’ve mentioned that you’re using GoodData.UI. Most of the axes-based visualizations support
sortBy
property, where you can define the sorting strategy for your data. Alternatively, if you’re using GD.UI only to get the data, you can follow this example.
j
Hi @Justin Unverricht, it is indeed limitation of current GD.CN version that it does not offer sort label feature. It is however on roadmap for Q2/2022 (may be subject to change). You can use the feature in our fully hosted platform if it is important for you to sort data in other order than alphabetically and cannot wait. It is available even in the free plan.
j
Thanks for letting me know, I ended up making a custom solution to sort the x-axis data until an official solution is implemented
a
Hello, wanted to ask if sort label feature is still on the roadmap for Good Data CN?
j
It has been delivered. See the answer in another thread: https://gooddataconnect.slack.com/archives/C01P3H2HTDL/p1661186948087289