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

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

Henry_Banks
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi jie.deng would you have an insight as to whether this requirement is in the backlog ? Kind regards, H