Hello all
I am facing the following issue in a SAC analytical application report.
I have ONLY one chart (as you can see in the below) that shows numbers for 2x measures upon a user selection based on a simple dropdown widget.

1.

2.

The code used in this dropdown is straight forward (as you can see below):
if
(this.getSelectedKey()==="1") // analysis by Sales Revenue { Chart_1.removeMeasure("[Account].[parentId].&[Gross_Margin]",
Feed.ValueAxis); Chart_1.addMeasure("[Account].[parentId].&[Sales_Revenue]",
Feed.ValueAxis); }else { // analysis by Gross Margin Chart_1.removeMeasure("[Account].[parentId].&[Sales_Revenue]",
Feed.ValueAxis); Chart_1.addMeasure("[Account].[parentId].&[Gross_Margin]",
Feed.ValueAxis);}
And I don’t need to create 2x charts, one for Sales Revenue and a second for Gross Margin and show/hide as per user selection.
My ONLY problem with this simple approach is SORTING.
Meaning, as you can see in the above images (and code) both charts displayed are rendering data without SORT control per code – only the chart that I have applied an advanced sort is showing correctly.
In previous version Lumira Designer we could control the SORTING of charts by using sortByMeasure statement or command line, but I don’t find a similar command in SAC analytical app. Therefore. I kindly ask you if you have a workaround for this problem.
What do I need to add in the above code to SORT measures dynamically?
NOTE: I know that I can solve this issue easily by adding a second chart and sort each chart accordingly and afterwards show/hide accordingly as well, but I want to avoid this path. I should be able to use only ONE chart to fulfil any SORTING scenario dynamically. Don’t you agree? Is this possible within a SAC application (code wise)?
I hope to hear from you soon.
Thanks & regards
Armando Santos
Request clarification before answering.
Unfortunately API to control Sorting is missing...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armando,
If the feature is indeed missing, as commented by Vadim, you can check the roadmap for SAP Analytics Cloud to see if this is already planned. If not you could raise an influence request: https://influence.sap.com/sap/ino/#/campaign/884.
Kind regards,
Martijn van Foeken | Interdobs
Hi, after checking internally, this feature request (AppDesign Script API for Chart/Table Sorting and Ranking) is in the development backlog as a 'future direction' item for later in 2021 - but no clear timelines at this stage. Regards, H
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a Henry to share this info. with us.
We know now that a set of new API´s to control SORT & RANK are coming next year into SAC app's side.
Regards
Armando Santos
Thanks Vadim & Martijn
I have just submitted my request to add this missing API to SORT a chart by any measure:
https://influence.sap.com/sap/ino/#/idea/255821
Meanwhile, I kindly ask you if you would like to suggest any workaround add it here please.
Regards
Armando Santos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.