Skip to Content
avatar image
Former Member

Design Studio 1.6 - Basic Mathematical Operations using two sources

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    May 14 at 12:05 PM

    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.


    Add comment
    10|10000 characters needed characters exceeded

  • May 14 at 09:23 AM

    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/

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 14 at 09:12 PM

    Thanks, Mustafa! :)

    Add comment
    10|10000 characters needed characters exceeded