Skip to Content
0
Former Member
Feb 03, 2013 at 12:54 PM

BPC 10 Script Logic: Using MDX Median

250 Views

Hello!

First, sorry if I posted in the wrong place, because it is my first post. This is a question about the BPC Script Logic 10.

I'm having trouble making a "script logic" in BPC 10 which calculates the median (not average) read where all values ​​in that dimension "TYPE" is equal to 1 and record this result in the "TYPE" = 111.

Below a piece of the script, in which the problem occurs:

* When TYPE

* IS 1

* Rec (Expression = Median ([TYPE]. [1], [Measures]. [SignedData]); TYPE = 111) / / ERROR OCCURS HERE

* ENDWhen

* Commit

That is, if you had the following information lines

Line 1: 5

Line 2: 15

Line 3: 22

I want him to severe 15 (median) for each item, playing in TYPE 111.

I think the problem is because Median is an MDX and do not know to use it in code.

Could anyone help me?

Thank you

David