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,

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

You already have an active moderator alert for this content.

Hi Rahul,

try...

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

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

## Add comment