cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

View Entire Topic
former_member186338
Active Contributor

Unfortunately API to control Sorting is missing...

mfoeken
Active Contributor

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