4 Replies Latest reply: Mar 4, 2014 2:49 AM by Anubhav

# Problem with calculating

Currently Being Moderated

Hello,

I have this structure country

CBU

SPAIN:

Andalucia

Catalunya

Valencia

Aragon

PORTUGAL

Center

North

South

FRANCE

Centro

Too I have  dimensions Clients, Periods, Versions, Scenaris, Years.

Dimensions
Accounts:

CALC

Price

Unites

Cost

Price and Unites are inputs a level  2 (Spain, Portugal, France)

Cost = Price * Unites but This value. I want save the first value of level zero

Price * Unites this country Spain in Andalucia

Price * Unites this country Portugal in Center

Price * Unites this country France in Auvernia

¿ As you can do this?

Regards

• ###### 1. Re: Problem with calculating
Currently Being Moderated

Hello,

First, it is advisable to do all data entry at level0. Therefore create an input member for Spain, France and Portugal.

Then you want the calculation of the Cost (Price * Units) for each country to be in the first member or should it be specific to Andalucia, Center and Auvernia ?

I would tag these with a UDA like CALC_COST

Aggregate the Input to the parent values.

Then take the UDA into the FIX

"Cost"=(@PARENTVAL("CBU", "Price") * @PARENTVAL("CBU", "Units"));

Not nicest but it will work.

Regards,

Philip Hulsebosch

• ###### 2. Re: Problem with calculating
Currently Being Moderated

It is in the first member

Then If I have UDA  (CALC_COST) in the each first member amount of its country.

then it would look like FIX?

FIX("FY13", "Actual", "Working", "JAN","Eur",@UDA (CBU, " CALC_COST "))

"Cost"=(@PARENTVAL("CBU", "Price") * @PARENTVAL("CBU", "Units"));

ENDFIX

There is an error?

I want is exactly, if I have an input cost, input price and input unites in level Countries (SPAIN, FRANCE, PORTUGARL, ETC), Calculate the unit cost = price * been done before Parent. The value of the parent only to store her first child

Regards

Xavier

• ###### 3. Re: Problem with calculating
Currently Being Moderated

Hello Xavier,

yes that is what I mean.

Do you get an error when running this?

" CALC_COST " should be without spaces.... "CALC_COST"

Regards,

Philip Hulsebosch

• ###### 4. Re: Problem with calculating
Currently Being Moderated

Try making the parents as Label only. i hope it will help.

#### Legend

• Correct Answers - 10 points