Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Passing date range parameters in MDX Query Expand / Collapse
Author
Message
Posted Monday, February 15, 2010 10:36 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, October 31, 2012 11:04 AM
Points: 13, Visits: 95
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.
Post #865854
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse