Desktop productivity for business analysts and programmers

Creating calculated member in Dim using currentmember mdx function

Reply
N/A
Posts: 1

Creating calculated member in Dim using currentmember mdx function

have some dim (dim_prod),

and I would like to create a calculated member based on that dim that will do the following:

If the user choose in level3 prod_no 114 I would like that the calculated member will contain 114,113 and 112

in case of choosing 121 it will take 121. 119, 118

If the user choose in level2 prod_no 13 I would like that the calculated member will contain 13,12 and 11 etc..

I tried to do the following, but it didn't work:

([dim_prod].[dim_prod].currentmember + [dim_prod].[dim_prod].currentmember.lag(1) + [dim_prod].[dim_prod].currentmember.lag(2) )

please help.

also attached part of dim product:

Level1   level2  level3

1          11          111

1          11          112

1          11          113

1          11          114

1          11          115

1          11          116

1          11          117

1          11          118

1          11          119

1          12          121

1          12          122

1          12          123

1          12          124

1          12          125

1          12          126

1          12          127

1          12          128

1          12          129

1          13          131

1          13          132

1          13          133

1          13          134

1          13          135

1          13          136

1          13          137

1          13          138

1          13          139

Kind Regards,

Leonid

Ask a Question
Discussion stats
  • 0 replies
  • 163 views
  • 0 likes
  • 1 in conversation