SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Passing date range parameters in MDX Query


Passing date range parameters in MDX Query

Author
Message
jaspreetsingh8
jaspreetsingh8
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 131
Following is my mdx query

SELECT NON EMPTY
{
[Measures].[Cache Attendees Count]
}
ON COLUMNS,
NON EMPTY
{
([Cache Attendees].[Visit Id].[Visit Id].ALLMEMBERS *
[Cache Attendees].[User Id].[User Id].ALLMEMBERS *
[Cache Attendees].[Screen Name].[Screen Name].ALLMEMBERS *
[Cache Attendees].[User Type Id].[User Type Id].ALLMEMBERS *
[Cache Attendees].[User Type Name].[User Type Name].ALLMEMBERS *
[Cache Attendees].[Group Date Count].[Group Date Count].ALLMEMBERS *
[Cache Attendees].[Insert Time Stamp].[Insert Time Stamp].ALLMEMBERS )
}
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM
(
SELECT
(
STRTOMEMBER(@FromCacheAttendeesInsertTimeStamp) : STRTOMEMBER(@ToCacheAttendeesInsertTimeStamp)
) ON COLUMNS FROM (
SELECT
(
STRTOSET(@CacheAttendeesConferenceId) ) ON COLUMNS FROM [Cube_Attendee])
)
WHERE ( IIF( STRTOSET(@CacheAttendeesConferenceId).Count = 1, STRTOSET(@CacheAttendeesConferenceId), [Cache Attendees].[Conference Id].currentmember ) )
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS



I want to filter my cube with three parameters

1. @CacheAttendeesConferenceId
2. @FromCacheAttendeesInsertTimeStamp
3. @ToCacheAttendeesInsertTimeStamp

When i pass following parameters
ConferenceId = 1, StartDate='2010-01-28T00:00:00', EndDate='2010-02-03T00:00:00'

Then it show records

But When i pass following parameters
ConferenceId = 1, StartDate='2010-01-27T00:00:00', EndDate='2010-02-03T00:00:00'

Then it display message No Data Available

PLease help me on this issue why not FromDate & ToDate range works properly.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search