dbTalk Databases Forums  

MDX Expression Help - Identify Row, Column, Filter Dimensions.

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX Expression Help - Identify Row, Column, Filter Dimensions. in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prasad
 
Posts: n/a

Default MDX Expression Help - Identify Row, Column, Filter Dimensions. - 05-17-2005 , 11:46 PM






Hi,

We have a requirement where the logic for a calculated member differs with
whether a particular dimension (Dim-A) is selected as a Row / Column
Dimension or selected as a filter.

I could not find out a way to identify whether a Dim-A is selected as
Row/Column dimension or as a filter in the MDX Expression.

I know there is an MDX function called “Axis” where Axis0 – is column &
Axis1 is Row. But I could not figure out the exact syntax.

Please help.
Prasad.


Reply With Quote
  #2  
Old   
MartinDS
 
Posts: n/a

Default RE: MDX Expression Help - Identify Row, Column, Filter Dimensions. - 05-18-2005 , 05:28 PM






As you will see in the online book Axis function return a set
Convert this sert in a String with SetToStr function, then use InStr VB
function for asking if THE dimension is in this axis. Example:

InStr(1,"[MyDimension].", SetToStr(Axis(0)) )

if this expresion > 1 then columns are your axis.
And so on with the other axis.



"Prasad" wrote:

Quote:
Hi,

We have a requirement where the logic for a calculated member differs with
whether a particular dimension (Dim-A) is selected as a Row / Column
Dimension or selected as a filter.

I could not find out a way to identify whether a Dim-A is selected as
Row/Column dimension or as a filter in the MDX Expression.

I know there is an MDX function called “Axis” where Axis0 – is column &
Axis1 is Row. But I could not figure out the exact syntax.

Please help.
Prasad.


Reply With Quote
  #3  
Old   
Prasad
 
Posts: n/a

Default RE: MDX Expression Help - Identify Row, Column, Filter Dimensions. - 05-26-2005 , 12:47 PM



How do i use the VB function "InStr" in the Calculated Member Builder in MSAS?

Thx

"MartinDS" wrote:

Quote:
As you will see in the online book Axis function return a set
Convert this sert in a String with SetToStr function, then use InStr VB
function for asking if THE dimension is in this axis. Example:

InStr(1,"[MyDimension].", SetToStr(Axis(0)) )

if this expresion > 1 then columns are your axis.
And so on with the other axis.



"Prasad" wrote:

Hi,

We have a requirement where the logic for a calculated member differs with
whether a particular dimension (Dim-A) is selected as a Row / Column
Dimension or selected as a filter.

I could not find out a way to identify whether a Dim-A is selected as
Row/Column dimension or as a filter in the MDX Expression.

I know there is an MDX function called “Axis” where Axis0 – is column &
Axis1 is Row. But I could not figure out the exact syntax.

Please help.
Prasad.


Reply With Quote
  #4  
Old   
MartinDS
 
Posts: n/a

Default RE: MDX Expression Help - Identify Row, Column, Filter Dimensions. - 05-27-2005 , 09:35 AM



In the Mdx Sample you will see the VB functions that can use in all the MDX
expresions.


"Prasad" wrote:

Quote:
How do i use the VB function "InStr" in the Calculated Member Builder in MSAS?

Thx

"MartinDS" wrote:

As you will see in the online book Axis function return a set
Convert this sert in a String with SetToStr function, then use InStr VB
function for asking if THE dimension is in this axis. Example:

InStr(1,"[MyDimension].", SetToStr(Axis(0)) )

if this expresion > 1 then columns are your axis.
And so on with the other axis.



"Prasad" wrote:

Hi,

We have a requirement where the logic for a calculated member differs with
whether a particular dimension (Dim-A) is selected as a Row / Column
Dimension or selected as a filter.

I could not find out a way to identify whether a Dim-A is selected as
Row/Column dimension or as a filter in the MDX Expression.

I know there is an MDX function called “Axis” where Axis0 – is column &
Axis1 is Row. But I could not figure out the exact syntax.

Please help.
Prasad.


Reply With Quote
  #5  
Old   
Prasad
 
Posts: n/a

Default RE: MDX Expression Help - Identify Row, Column, Filter Dimensions. - 06-01-2005 , 03:40 PM



Hi Martin,

Thanks for your reply.

I was trying to build the calculated member using the MDX Expression
builder. Here are the 2 things i am trying to do and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1,"[MyDimension].", SetToStr(Axis(0)) )

Sample 2:

Iif(InStr(1,"[MyDimension].", SetToStr(Axis(0)) ) > 1, "True", "False")

Please help with the syntax,

Thx


"MartinDS" wrote:

Quote:
As you will see in the online book Axis function return a set
Convert this sert in a String with SetToStr function, then use InStr VB
function for asking if THE dimension is in this axis. Example:

InStr(1,"[MyDimension].", SetToStr(Axis(0)) )

if this expresion > 1 then columns are your axis.
And so on with the other axis.



"Prasad" wrote:

Hi,

We have a requirement where the logic for a calculated member differs with
whether a particular dimension (Dim-A) is selected as a Row / Column
Dimension or selected as a filter.

I could not find out a way to identify whether a Dim-A is selected as
Row/Column dimension or as a filter in the MDX Expression.

I know there is an MDX function called “Axis” where Axis0 – is column &
Axis1 is Row. But I could not figure out the exact syntax.

Please help.
Prasad.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.