dbTalk Databases Forums  

MDX | Constant Values in ResultSet

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


Discuss MDX | Constant Values in ResultSet in the microsoft.public.sqlserver.olap forum.



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

Default MDX | Constant Values in ResultSet - 02-03-2010 , 07:10 AM






Hi,
I required to view some constant values in my result set
For Example:
Stratification StartValue EndValue
SomeCalculation
Quote:
$5M 99999999 5000000
$3-$5M 5000000 3000000
$1.5-3M 3000000 1500000
$500K-1.5M 1500000 500000
$250K - $500K 500000 250000
<$250K 250000 0


I have try it but not getting sucess with following statment.
Can anybody help me to achive this.

Regards
Rahul

With
MEMBER MEASURES.CONSTANTVALUE1 AS 99999999
MEMBER MEASURES.CONSTANTVALUE2 AS 5000000
MEMBER MEASURES.CONSTANTVALUE3 AS 3000000
MEMBER MEASURES.CONSTANTVALUE4 AS 1500000
MEMBER MEASURES.CONSTANTVALUE5 AS 500000
MEMBER MEASURES.CONSTANTVALUE6 AS 250000
MEMBER MEASURES.CONSTANTVALUE7 AS 0
Set [Stratification] As
{
MEASURES.CONSTANTVALUE1,
MEASURES.CONSTANTVALUE2,
MEASURES.CONSTANTVALUE3,
MEASURES.CONSTANTVALUE4,
MEASURES.CONSTANTVALUE5,
MEASURES.CONSTANTVALUE6,
MEASURES.CONSTANTVALUE7
}
Member [Date].[Fiscal Year].[CurrentVal] As
[Stratification].CurrentMember
Member [Date].[Fiscal Year].[PreviousVal] As
[Stratification].PrevMember
Select
{[Date].[Fiscal Year].[CurrentVal],
[Date].[Fiscal Year].[PreviousVal]
} On Columns,
{[Stratification]} On Rows
From [Adventure Works];

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 - 2013, Jelsoft Enterprises Ltd.