Skip to Content

Calculation of Ratio through Script Logic

Dear Experts,

I want to calculate ratio of sales for each combination of division group and profit center group through script logic.

Example: Attached in imagecapture.png

script attachedscript.png

Regards,

capture.png (5.5 kB)
script.png (50.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 30, 2016 at 04:52 PM

    It's a bad idea in general to calculate ratios using script logic. Use dimension member formulas.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 03, 2017 at 03:06 PM

    Hi Rahul,

    try...

    *REC(Factor = 1/ ([C_ACCOUNT].[BS130],[INTERCO].[I_NONE],[FLOW].[F_999],[AUDITTRAIL].[RECLASS],[SEGMENT].[10],[PRCTR].[1001]), C_ACCOUNT = BS122 ....

    Add comment
    10|10000 characters needed characters exceeded

    • It's technically possible to perform division in script logic but it's meaningless to calculate ratios by script logic - ratios are not summable and will produce strange results in reports...