Advertisement

04.02.2008 at 10:29AM PDT, ID: 23290152
[x]
Attachment Details

Microsoft, Analysis Server, SQL 2005, MDX

Asked by scrataz in OLAP, SQL Reporting, SQL Server 2005

Tags: Microsoft, Analysis Server, SQL 2005, MDX

Hi There,

Is there a way to find out if a member exists in a set in MDX other than using STRTOSET?
I do not want to use: (since STRTOSET is expensive and sort of deprecated)
IIF( STRTOSET(@A, CONSTRAINED).Count = 1, STRTOSET(@A, CONSTRAINED), [Area].currentmember ) )

I tried using RANK, ORDER or Compare MemberName to IsEmpty or null, but did not get anywhere.

So, lets say, I have a set that has members 1 through 5 in a set called 'S'

 IIF(([s].&[1].Member_Name = ""),1,2) - works
 IIF(([s].&[15].Member_Name = ""),1,2) - gives #VALUE!  - so if I try to access a member that is not there, what is returned actually? Its not NULL since I tried  IIF(([s].&[15].Member_Name is NULL),1,2) and still got #VALUE!

Similarly,  IIF(Rank([s].&[15].Member_Name) >0),1,2) didn't work and gave #VALUE!.

Any help is appreciated.

Thanks
Start Free Trial
[+][-]04.05.2008 at 03:05AM PDT, ID: 21287605

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.06.2008 at 02:36AM PDT, ID: 21291241

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.07.2008 at 01:49PM PDT, ID: 21300441

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.07.2008 at 01:59PM PDT, ID: 21300516

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.17.2008 at 02:05PM PDT, ID: 21381355

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: OLAP, SQL Reporting, SQL Server 2005
Tags: Microsoft, Analysis Server, SQL 2005, MDX
Sign Up Now!
Solution Provided By: Einstine98
Participating Experts: 4
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628