Skip to Content
0

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

Nov 24, 2016 at 12:54 PM

616

avatar image
Former Member

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..

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Nov 24, 2016 at 06:23 PM
0

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


initial-view.png (16.4 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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...

0
Former Member
Former Member

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

1
avatar image
Former Member Nov 26, 2016 at 08:46 PM
0

Thanks bro....

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 06, 2016 at 05:58 PM
0

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...


Share
10 |10000 characters needed characters left characters exceeded
Anshu Lilhori Mar 14 at 09:40 AM
0

Hi,

Were you able to solve this issue ?

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

Thanks in advance.

Regards,

AL

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Anshu,

The solution has already been posted above.

Regards,

Mustafa.

0

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

0

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.

0