cancel
Showing results for 
Search instead for 
Did you mean: 

Error when validating Script logic

Former Member
0 Kudos

Hi,

Im trying to validate a very sime script logic file. The logic i have written is


*XDIM_MEMBERSET ACCOUNT = RENT

[ACCOUNT].[RENT] = ACCOUNT.[RENT] * 1.1

*COMMIT

When I validate, I get the following error

"There is no base member in the selected members of dimension : ACCOUNT"

What could be the problem ...

Regards,

Prasanth.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What BPC version are you running?

Looks like you're trying to use an MDX syntax, which I believe requires a hash-mark on the left side of the equation. Plus you have the word account in [brackets] on the left side, but not the right side.

A better approach may be SQL syntax, such as the following.


*XDIM_MEMBERSET ACCOUNT = RENT

*when *
*is *
*REC(Factor=1.1)
*endwhen
 *COMMIT

But note the risk of this logic (either in MDX or SQL). Each time it's run it will ratchet up the value by another 10%. Run it twice and it's 21%, etc. If that's the result that you're after, then there is no problem with writing the logic that way.

A different approach, that allows for re-execution with stable results, is to post the 10% adjustment to a different member of some dimension of your choice. Here's an example :


*XDIM_MEMBERSET ACCOUNT = RENT
*XDIM_MEMBERSET Datasrc = Load,Input

*when *
*is *
*REC(Factor=0.1,Datasrc=Calc)
*endwhen
 *COMMIT

Former Member
0 Kudos

Hi Tim,

Thanks! I am running BPC 5.1.

In fact I did try validating with the # on the left and with the brackets. Missed them when posting in the thread.

The logic you have given works fine. Could you kindly elaborate on the following statement that you have written

*REC(Factor=0.1,Datasrc=Calc)

What exactly does this statement do. Is there a reason you have used Factor as 0.1 and not 1.1 and what is the significance of using "Calc"

Regards,

Prasanth.

Former Member
0 Kudos

My example there assumes you have a dimension datasrc, with three base members input, load and calc. Assume all 3 share a parent, AllDataSrc

The logic then takes the values in the first two (input & load), and adds them up, then posts the 10% uplift to the third member calc.

The original values in input & load remain untouched. As an example, before running the calculation for the first time:

Load = 50

Input = 100

Calc = 0

and AllDataSrc therefore = 150

Then after running the calculation, the values are:

Load = 50

Input = 100

Calc = 15

and AllDataSrc therefore = 165.

And the key point is that, because the logic hasn't altered Load or Input, the next time the calc runs, it produces the same results.

The factor of 0.1 gives a total amount (165) that is 10% higher (15) than the original, or 110% in total.

If you used a factor of 1.1, it would give you 110% higher (165), or 210% total (315).

It's up to you to decide the appropriate factor to use.

Former Member
0 Kudos

Perfect Tim, Thank you!

Just one last question, would you be having links to resources explaining in detail the syntax of SQL logic used in BPC.

Regards,

Prasanth.

Former Member
0 Kudos

The Admin guide is the best (only?) documentation of the SQL syntax. It's comprehensive in most regards, but very light on useful learning examples.

There are many threads on this forum related to SQL script logic, and you may find some useful threads here to see the syntax in action.

Former Member
0 Kudos

Thanks!

Answers (0)