## Forum Stats

• 3,839,437 Users
• 2,262,492 Discussions
• 7,900,966 Comments

Discussions

# PBCS - Rule with variable in Calculation Manager

Member Posts: 129
edited Oct 5, 2016 7:48AM

I have created this rule:

FIX (@Relative("SEVE_PARTIDAS", 0))

DATACOPY "Actual"->"FY15" to "Forecast"->"FY16";

ENDFIX

With this rule, I copy in the account members (SEVE_PARTIDAS) the data, from Actual (Scenario member) of FY15 (Year member) to Forecast (Scenario member) of FY16 (Year member).

Now, I want to add a  {Percent} variable. Then, this value will use to calculate the amount. For example, the amount of "Forecast FY16" is the result of:  {Percent} variable  * (Amount "Actual FY15).

What instruction need to include in the rule above  with {Percent} variable?

Thanks a lot.

Tagged:

## Best Answer

• Member Posts: 129
edited Oct 5, 2016 7:29AM Answer ✓

This formula, I think that to serve me:

FIX (@Relative("SEVE_PARTIDAS", 0))

FIX("FY16")

"Forecast" = "Actual"->"FY15" * {Percent};

ENDFIX

ENDFIX

## Answers

• Member Posts: 1,541 Gold Trophy
edited Oct 5, 2016 5:27AM

Hi

How about you try something and if it doesn't work we'll help you figure it out?

• Member Posts: 129
edited Oct 5, 2016 5:39AM

In the previous formula, I added the variable directly:

FIX (@Relative("SEVE_PARTIDAS", 0))

DATACOPY ("Actual"->"FY15"{Percent}) to ("Forecast"->"FY16"*);

ENDFIX

• Member Posts: 1,541 Gold Trophy
edited Oct 5, 2016 5:54AM

DATACOPY is a pretty self explanatory command, it copies data. Please read the documentation for the commands you use first.

If you want to perform a multiplication you'll have to write an equation. Though if Year is sparse you'll want to keep the DATACOPY command to create blocks.

If "sparse" and "blocks" are not concepts you're familiar with, please refer to: Understanding Multidimensional Databases

• Member Posts: 129
edited Oct 5, 2016 6:15AM

I thougt that "datacopy" allowed to copy data and to include formulas.

I review the documentation that refer you.

Thanks.

• Member Posts: 129
edited Oct 5, 2016 7:29AM Answer ✓

This formula, I think that to serve me:

FIX (@Relative("SEVE_PARTIDAS", 0))

FIX("FY16")

"Forecast" = "Actual"->"FY15" * {Percent};

ENDFIX

ENDFIX

• Member Posts: 1,541 Gold Trophy
edited Oct 5, 2016 7:47AM

That's much better yes

This discussion has been closed.