Showing posts with label dimension. Show all posts
Showing posts with label dimension. Show all posts

Wednesday, March 21, 2012

How to include multiple membes in an expression?

Hello, I'm wondering how can I include multiple members from a dimension in a Calculated Measure Expression?

Good (single member) ([ActionGroup].[ActionTag].&[147300], [Measures].[Unique Visitors])

#Value Error (multiple members)

([ActionGroup].[ActionTag].&[147300].&[107139], [Measures].[Unique Visitors])

({[ActionGroup].[ActionTag].&[147300], [ActionGroup].[ActionTag].&[107139]}, [Measures].[Unique Visitors])

Any pointer is appreciated

-Lawrence

Is this what you are looking for ?

Aggregate({[ActionGroup].[ActionTag].&[147300], [ActionGroup].[ActionTag].&[107139]} , [Measures].[Unique Visitors])

Friday, February 24, 2012

How to implement "AND NOT IN" in a many-to-many relationship dimension?

Hello,

I have 2 tables, reason and complain. 1 complain can have multiple reasons and a reason can be linked to multiple complains.

Reason Complain_ID

-

A 1

A 2

B 1

B 3

C 1

D 2

In the analysis Services, I have a Reason dimension, and when I browse for the number of complains per reason, the browser shows:

Reason Complain Count

--

A 2

B 2

C 1

D 1

But, how can I query the Analysis Service to count only complains for Reason B, C, D, BUT NOT count complains that includes Reason A... Something like "... AND NOT IN...." that we can do in SQL.

The result I'm expecting is something like the following:

Reason Complaini Count

--

B 1 (only complain_id 3 does not include Reason A)

Thank you very much,

Sincerely,

Annie

I found the document "The Many-to-Many Revolution" by Marco Russo, and it solved my problem.

Thanks everyone~~

How to implement "AND NOT IN" in a many-to-many relationship dimension?

Hello,

I have 2 tables, reason and complain. 1 complain can have multiple reasons and a reason can be linked to multiple complains.

Reason Complain_ID

-

A 1

A 2

B 1

B 3

C 1

D 2

In the analysis Services, I have a Reason dimension, and when I browse for the number of complains per reason, the browser shows:

Reason Complain Count

--

A 2

B 2

C 1

D 1

But, how can I query the Analysis Service to count only complains for Reason B, C, D, BUT NOT count complains that includes Reason A... Something like "... AND NOT IN...." that we can do in SQL.

The result I'm expecting is something like the following:

Reason Complaini Count

--

B 1 (only complain_id 3 does not include Reason A)

Thank you very much,

Sincerely,

Annie

I found the document "The Many-to-Many Revolution" by Marco Russo, and it solved my problem.

Thanks everyone~~

How to ignore a dimension in MDX?

So my fact table looks like this:

SurveyID ( --> Survey Dimesion)
GroupID( --> Group Dimension)
StatusID ( --> Status Dimension ... e.g. Complete, InProgress, New)
GroupCount (the actual measure)

How would I create a calculated member that would return the "overall" count for a specific group in a survey (e.g. ignore Status dimension) regardless if the user is slicing the data by Status or not?

Thanks again - wgpubs

Try this ("ignoring" the status dimension - your exact naming may differ):

CREATE MEMBER CURRENTCUBE.MyCount AS

'([Status].[StatusID].[All StatusID],[Measures].[GroupCount])';

|||tried this ... but if I include the ResponseStatus dimension in my slicer it still filters on ResponseStatus.

In my slicer I got survey, group and response status ... the kind of report I'm trying to generate in SSRS needs to looks something like this:

Survey Group Count OverallCount

... where Count should use the ResponseStatus dimension (so that users can filter out certain statuses and what not thru a RS parameter) while OverallCount should not.|||My suggestion should work, if I understand you correctly. Please post your exact MDX query.|||Yah I thought it would too ... but no go. here is the query:

CREATE MEMBER CURRENTCUBE.[MEASURES].[Overall Group Count]
AS ([Response Status].[Response Status].[All], [Measures].[Group Count]),
VISIBLE = 1 ;