Hi David,
try please
* Rec (Expression = Median ([TYPE]. [1], [Measures]. [SignedData]); TYPE = "111")
Kind regards
Roberto
I tried the code below. Shows no error, but the calculation is not done correctly.
I'm trying to use AVG initially to facilitate the calculation is being done correctly.
*XDIM_MEMBERSET CAT_APURACAO = 1
*XDIM_MEMBERSET PERIODO_APURACAO = 2
*XDIM_MEMBERSET TIME = NONE
*XDIM_MEMBERSET TIPO = 11
[TIPO].[#11]=AVG({[TIPO].[111],[REVENDA].AllMembers}) //here the code
*COMMIT
In case you have 4 members in the dimension [REVENDA]. Each member has the following values in the dimension [TIPO] = 111:
First: 6515295
Second: 4633418
Third: 5666779
Bedroom: 3103285
The average was 4,979,694 and 5,150,098 median. That is, the calculation using AVG, he should write to each [REVENDA] the value 4979694. However, it is writing 28861790 in 4 members. Someone could tell what is wrong??
Note: AVG used to facilitate the conference, what I really need is the median.
Thank you
Hi,
I am using the code:
[TIPO].[#111]=MEDIAN({FILTER([REVENDA].[R].Children, ([REVENDA].CurrentMember.Properties("AS")=%AS% or [REVENDA].CurrentMember.Properties("AS")='N') and ([REVENDA].CurrentMember.Properties("TERCEIRO")=%TERCEIRO% or [REVENDA].CurrentMember.Properties("TERCEIRO")='N'))},[TIPO].[11])
It was working, but now is giving error in executing the mdx
Add comment