Defining a calculated member in MDX - filtering a measure's value?

To begin with, you can define a new calculated measure in your MDX, and tell it to use the value of another measure, but with a filter applied: WITH MEMBER Measures. Incoming Traffic AS '(Measures. Total traffic, Direction.(All).

In) Whenever you show the new measure on a report, it will behave as if it has a filter of 'Direction > In' on it, regardless of whether the Direction dimension is used at all But in your case, you WANT the Direction dimension to take precendence when used....so things get a little messy. You will have to detect if this dimension is in use, and act accordingly: WITH MEMBER Measures. Incoming Traffic AS 'IIF(Direction.

CurrentMember = Direction.(All). Out, (Measures. Total traffic), (Measures.

Total traffic, Directon.(All). In) ) To see if the Dimension is in use, we check if the current cell is using OUT. If so we can return Total Traffic as it is.

If not, we can tell it to use IN in our tuple.

To begin with, you can define a new calculated measure in your MDX, and tell it to use the value of another measure, but with a filter applied: WITH MEMBER Measures. Incoming Traffic AS '(Measures. Total traffic, Direction.(All).

In)' Whenever you show the new measure on a report, it will behave as if it has a filter of 'Direction > In' on it, regardless of whether the Direction dimension is used at all. But in your case, you WANT the Direction dimension to take precendence when used....so things get a little messy. You will have to detect if this dimension is in use, and act accordingly: WITH MEMBER Measures.

Incoming Traffic AS 'IIF(Direction. CurrentMember = Direction.(All). Out, (Measures.

Total traffic), (Measures. Total traffic, Directon.(All). In) )' To see if the Dimension is in use, we check if the current cell is using OUT.

If so we can return Total Traffic as it is. If not, we can tell it to use IN in our tuple.

With the exception that incoming trafficout = 0, so instead of "(Measures. Total traffic)" I used "0". Thanks a lot!

– Nickolay Oct 15 '08 at 13:15.

I think you should put a column in your Total Traffic fact table for IN/OUT indication & create a Dim table for IN & Out value and now you can analyse your data based on IN & Out. Thanks.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions