Former Member

# Formula Problem in BEx

Dear All,

I am using BEx Query Designer to make a query.I view the report using browser. I have 2 keyfigure fields "price" and "forecast quantity". I have to arrive at "forecast Value" = price * forecast quantity using formula in Query designer. Although for each material this proves correct in report material wise. If I see the report customer-wise a customer who has bought 10 materials first the prices are added up andthen the forecast quantity is added up and then the sums are multiplied to get forecast value which is wrong.

Illustration :

For Customer 1 :

Quantity Price Value(Quantity * price)

Material1 | 2 | 10 | 20

Material2 | 3 | 10 | 30

Material3 | 5 | 10 | 50

Material4 | 7 | 10 | 70

Total | 17 | 40 | 170 = Correct value

But if I see report customer wise I get the value as 17 * 40 = 680 which is wrong.

Is there any way when I see an aggregation of materials the calculation in formula column first multiplies individual rows and then add the rows to give me final value?

Regards,

Ratish

ratish_prem@yahoo.com

##### Add a comment
10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Jul 02, 2007 at 08:54 AM

Hi Ratish,

it's seems like a problem with your aggregation.

In the query designer, select the characteristic 'material' and then look at the tabpage calculation -> there you can select 'calculate result as' -> total.

Normally the total of the values will be calculated.

Ciao

Joke

##### Add a comment
10|10000 characters needed characters exceeded
• Former Member

Hello ,

Right click on the calculated key figure select properties enhanced and change to Before aggregation , now the result is calculated correctly.

But if you use before aggregation, the cubes aggregates are not used, so this will have negative effect on performance , this property is applicable to query level key figures.

hope it is clear

assign points if useful

• Former Member
Posted on Jul 02, 2007 at 09:40 AM

Hi,

Right click the calculated keyfigure, in the <i>Calculate Result As</i> column select <i>Summation</i>.

Save and execute the query.

Regards,

Vivek V

##### Add a comment
10|10000 characters needed characters exceeded
• Posted on Jul 02, 2007 at 11:33 AM

Hi,

Try out by setting 'calculate result as..' of formula to 'summation' and with formula collision to 'nothing defined' or 'result from this formula'.

thanks

##### Add a comment
10|10000 characters needed characters exceeded
• Former Member
Posted on Jul 02, 2007 at 09:00 PM

Hi Ratish,

Right click on the formula and choose "summation" for overall results. That should solve this.

Thnx

##### Add a comment
10|10000 characters needed characters exceeded