cancel
Showing results for 
Search instead for 
Did you mean: 

how to get max value from sales dimension/measure using script in sap design studio

safal_agrawal
Explorer
0 Kudos

how to get max value from salesRevenue measure(column) using script in sap design studio.

And assign that value on charts_1 Y-Axis dynamically on runtime.

I am using efashion DB..

Accepted Solutions (1)

Accepted Solutions (1)

former_member265529
Contributor
0 Kudos

Hi Safal,

The easiest way to get maximum value dynamically is, in your initial view of data source use calculate total as option as maximum as shown below

Then you can use below code to get result row data

DS_1.getDataAsString("Measure", {});


Thanks,

Poovarasan

safal_agrawal
Explorer
0 Kudos

I am having a similar issue to min and max value from measure in textbox and calculate them to find avg..

How to get these values using foreach loop and array..

Is it possible to achieve this values using foreach loop and array and compare dynamically

As the previous idea fails in that condition...

former_member265529
Contributor

Hi Safal,

For your requirement you can create a copy of same measure in initial view of data source by adding a dynamic calculation. Then you can calculate maximum and minimum in two measures.

So you will get both minimum and maximum values from data itself. No need of scripting.

Thanks,

Poovarasan

Answers (3)

Answers (3)

anshu_lilhori
Active Contributor
0 Kudos

Hi,

Were you able to solve this issue ?

If yes then let me know the process for the same.

Thanks in advance.

Regards,

AL

MustafaBensan
Active Contributor
0 Kudos

Anshu,

The solution has already been posted above.

Regards,

Mustafa.

anshu_lilhori
Active Contributor
0 Kudos

Hi Mustafa,

Thanks for fast response. In fact i learn a lot from your blogs and replies.

My issue is that i am using a stacked chart with dual axes.

Primary axes showing the actual and secondary the budget.

Now the problem is with the scaling of both the axes.Somehow i want to fix the axes value same for both of them.

Whenever user selects any country then the scaling gets disturbed, so even if the value of actual is more than budget,the bar gives wrong picture in terms of visualization.

I want the my primary axes to get the value of secondary axes.

I tried lot of things.Somehow the scripting does not work or may be am not that good at it.

Can you please suggest the way to do that.

Regards,

AL

MustafaBensan
Active Contributor
0 Kudos

Hi Anshu,

Since this is a closed question I would suggest you post a new question to ensure better visibility and response from the community.

Regards,

Mustafa.

safal_agrawal
Explorer
0 Kudos

Hi Poovarasan

I am having a similar issue to min and max value from measure in textbox and calculate them to find avg..

How to get these values using foreach loop and array..

As the previous idea fails in that condition...


safal_agrawal
Explorer
0 Kudos

Thanks bro....

For your Help..It is really helpful for me..