# Dimension Formula Results with Multiple Member Selection in Page Key Not Working

Good day all. Working in BPC 7.5 MS.

We have a simple dimension formula to calculate gross margin % (Gross Margin / Revenue) in our account dimension. The Acctype is "INC". The formula works fine if we have a single member selection for datasource in the page key. However, if we have two members in the page key for datasource, BPC seems to be calculating the value for each datasource separately and adding them together, thus giving us an incorrect answer.

Simple math example: Gross Margin for datasource A is 50% (50/100) and B is 60% (60/100). For a combined selection of A and B, the right answer should be 55% (110/200) but the system is bringing back 110%.

Due to the nature of our datasource dimension, a new top level parent (or alternate hierarchy) to combine the two isn't desirable. Outside of having to use an Excel formula to calculate the value, I'm wondering if there are any other possible solutions.

##### Tags:

##### Roberto Vidotti replied

Hi Kim,

other then hierarchy and excel formula I think you have only the possibility to use a script logic instead of dimension formula to calculate rightly the percentage.

Regards

Roberto