Skip to Content
0

Design Studio 1.6 - Basic Mathematical Operations using two sources

May 14 at 09:20 AM

35

avatar image
Former Member

Can we perform basic mathematical operations using two measures from two independent data sources?

For example, source A = SAP BW and we assign variable1 to measure X

source B = SAP HANA and we assign variable2 to measure Y

variable3 = variable 1 + variable 2 (measure X + measure Y)

Can we output variable3 back to a text component? I tried it and it doesn't seem to work

Any insight would be appreciated.

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

3 Answers

Best Answer
Mustafa Bensan May 14 at 12:05 PM
0

Hi Nishanth,

You should be able to achieve the desired result at run-time via scripting as follows:

1) Assign a specific Measure X value to Variable1 using script DataSource.getData().value against the BW data source

2) Assign a specific Measure Y value to Variable2 using script DataSource.getData().value against the HANA data source

3) Apply the mathematical operation with script var Variable3 = Variable1 + Variable2

4) Assign result to text component with script TEXT_1.setText(Variable3 + "")

Regards,

Mustafa.


Share
10 |10000 characters needed characters left characters exceeded
Tammy Powlas
May 14 at 09:23 AM
0

Unfortunately that is not possible at design time; perhaps at run-time but not with a text box - see https://blogs.sap.com/2015/11/27/custom-measures-calculations-sap-design-studio-16/

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 14 at 09:12 PM
0

Thanks, Mustafa! :)

Share
10 |10000 characters needed characters left characters exceeded