Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX Newbie question 1

Status
Not open for further replies.

SQLBI

IS-IT--Management
Jul 25, 2003
988
GB
Hi,

I'm totally new to MDX and need to add a Calculated Member to my SQL 2k Analysis Services Cube.

I've gotten as far as adding the member, but at present it is calculating for all members in a particular dimension.

Code:
[Measures].[Revenue Inc Tax]/[Measures].[Visits In Period]

What i want to do is ONLY have this calculation performed on 1 specific member of my dimension, by doing something like
Code:
 IF [Indicator].[Indicator Id] = 3 THEN [Measures].[Revenue Inc Tax]/[Measures].[Visits In Period] ELSE IS NULL

Is this possible and if so, how should i go about it?

Thanks in advance.

Leigh Moore
Business Systems Manager
Vets4Pets Veterinary Group
 
Leigh,

I assume you are using the cube editor to add your calculated member. You can add this logic to the mdx builder for the calculated member.

IIF([Indicator].CurrentMember IS [Indicator].[Indicator Id].[3],[Measures].[Revenue Inc Tax]/[Measures].[Visits in Period],null)

hth,

Justin
 
Justin,

Thanks for that, just had to make .[3] .&[3] and it worked perfectly.

Cheers, have a star!

Leigh Moore
Business Systems Manager
Vets4Pets Veterinary Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top