SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 MDX START & END DATE
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

OBINNA_EKE
Posting Yak Master

234 Posts

Posted - 05/16/2013 :  06:53:11  Show Profile  Reply with Quote
I have a question with my role playing dimension (START/END Date), the equivalent query in T-SQL is shown below

SELECT ACTUAL,SLA_ID, EVENT FROM DBO.TBL_CONSOLIDATED_SLA_B
WHERE START_TIME >=@FROMDATE AND END_TIME <=@TODATE AND SLA_ID =3

I have created the Cubes & Dimensions and I now have Date as dimension.
and Start Date, End Date as (ROLE PLAYING DIMENSION)

I have tried below to implement the same functionality in MDX but the result is not right (I think I am doing something wrong).
The actual value in MDX is bigger that the SQL VERSION. Any Code help will be appreciated.


SELECT
NON EMPTY ({[Measures].[ACTUAL],[Measures].[EVENTS] }) ON 0,
NON EMPTY({[SLA].[SLA NAME].[SLA NAME].ALLMEMBERS},[SLA].[SLA ID].&[3]) ON 1
FROM [SLACube]
WHERE
(
{[START DATE].[Calender].[Day Month Year].&[01 January, 2013]: NULL}
,{NULL : [END DATE].[Calender].[Day Month Year].&[10 January, 2013]}
)


Note: This example did not work for me.

http://www.purplefrogsystems.com/blog/2013/04/mdx-between-start-date-and-end-date/

If it is that easy, everybody will be doing it

ditch
Flowing Fount of Yak Knowledge

South Africa
1466 Posts

Posted - 05/27/2013 :  09:08:56  Show Profile  Visit ditch's Homepage  Reply with Quote
I think the problem here is a design issue.
Having 2 time Dimensions can cause some confusion.

I try to keep 1 time Dimension across cubes by assigning the time dimension a standard key which in some cases needs to be derived in sql somehow.


Duane.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000