![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I need help with rank mdx query: This works ok: WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), {([Gender].[All Gender].Children)} on Axis(1) from Sales but I don't know how to do such query with two dimensions on Axis(1) f.e. WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), { {([Marital Status].[All Marital Status].Children)} * {([Gender].[All Gender].Children)} } on Axis(1) from Sales gives mi formula error in R1 column Any help? |
#3
| |||
| |||
|
|
Hello, I need help with rank mdx query: This works ok: WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), {([Gender].[All Gender].Children)} on Axis(1) from Sales but I don't know how to do such query with two dimensions on Axis(1) f.e. WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), { {([Marital Status].[All Marital Status].Children)} * {([Gender].[All Gender].Children)} } on Axis(1) from Sales gives mi formula error in R1 column Any help? |
#4
| |||
| |||
|
|
Your second statement has a problem: WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), { {([Marital Status].[All Marital Status].Children)} * {([Gender].[All Gender].Children)} } on Axis(1) from Sales ...the problem with "([Gender].[All Gender].Children)}" is that you're trying to get children of a level, not of a specific member. I'm guessing you wanted the genders listed, so I rewrote that query as: WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), { {([Marital Status].[All Marital Status].Children)} * {[Gender].[Gender].members} } on Axis(1) from Sales ...now, however, you'll get #ERR in the R1 calc because you're set doesn't make sense in the ORDER statement. The question is, what exactly are you trying to order and rank in that second query? Maybe I can help more if I know. - Phil "PN" wrote: Hello, I need help with rank mdx query: This works ok: WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), {([Gender].[All Gender].Children)} on Axis(1) from Sales but I don't know how to do such query with two dimensions on Axis(1) f.e. WITH MEMBER [Time].[R1] AS 'RANK( Axis(1).Item(0).Item(0).Dimension.CurrentMember, ORDER (Axis(1), ([Measures].[Profit],(Axis(0).item(0).item(0))), ASC) )', SOLVE_ORDER=1 select {([Time].[1997].Children), [Time].[R1]} on Axis(0), { {([Marital Status].[All Marital Status].Children)} * {([Gender].[All Gender].Children)} } on Axis(1) from Sales gives mi formula error in R1 column Any help? |
#5
| |||
| |||
|
| WITH |
![]() |
| Thread Tools | |
| Display Modes | |
| |