need help with the passing date parameters in MDX for ssrs report
Hi all, i m pretty new to MDX i had created a mdx query in report builder by making use of GUI i had created two different parameters, i need to add the start and end date to the report how to filter the data depending on start and end date i dont have any related dimension to it.
May 18th, 2011 1:44pm

Hi, Create two parameters in the parameters section "Start date" and "End Date" having date time data type. Then add the fields also the Time dimension attribute on to the Query Designer. Then go to the dataset properties->Click on filter and you need to enter these expressions Fields!Time.Value >= Parameters!StartDate.Value and Fields!Time.Value < Parameters!EndDate.Value This will filter your report based on the dates you select. HTH, Ram
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 2:09pm

Hi Ram thanks for ur reply ........i have a fact which has 10 diff measures and i need to create a report which pulls all the information related to start and end date what i did was i created a time calendar by insertind the date till 2020 and i had created few dimension as year and month and i had created a date field CONVERT(VARCHAR(10), PK_Date, 101) AS date i had created a filters Fields!date.Value >= Parameters!StartDate.Value and Fields!date.Value < Parameters!EndDate.Value the start and end date are date/time type when i selecting the parameter i m getting an error the property defaultvalue of parameter doesn't habe the expected type
May 19th, 2011 12:05pm

Hi, Please do not convert your date field. Do not use the CONVERT(VARCHAR(10), PK_Date, 101) . What is the data type of this field? It has to be a date time. HTH, Ram
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 1:16pm

in cube its string ........................do i need to convert it to datetime in cube or in rpeorting
May 20th, 2011 11:24am

If its a date field then you need to have appropriate data types. <ake sure you convert it in cube and you can directly use it in reports. What is the data type of this field in source data? Ram
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2011 2:23pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics