.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

FILTER within a Date Set

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server

Basic question.....

This works fine

   [Measures].[Order Amount] on COLUMNS,
    [Customer].[CustId].CurrentMember.Properties("First Order")=[Date].[Date].Properties('Name')
    )  ON Rows
FROM [CustomerOrder]
WHERE {[Date].[Date].&[2007-03-20T00:00:00]}

Works fine

However when using a set...it fails


   [Measures].[Order Amount] on COLUMNS,
    [Customer].[CustId].CurrentMember.Properties("First Order")=[Date].[Date].Properties('Name')
    )  ON Rows
FROM [CustomerOrder]
WHERE {[Date].[Date].&[2007-03-20T00:00:00]:[Date].[Date].&[2007-03-25T00:00:00]}

Error : Query (5, 88) The MDX function CURRENTMEMBER failed because the coordinate for the 'Date' attribute contains a set.


View Complete Post

More Related Resource Links

Filter items with a date column with parameters start date and end date on a sharepoint list?

If I have alist with a view that has the columns Title, Status and Status Date and the view has some items. How Can I add a filter with two parameters, start date and end date, to only show records with status date equal to or greater than parameter start date and status date is less than or equal to parameter end date? This is a sharepoint online site and I can't create and deploy custom code, can use SPD though. Do I need to use SPD or is this something I can do in the list settings? Thanks in advance.   Edit: I had a look here http://www.endusersharepoint.com/2009/09/29/sharepoint-date-filter-filtering-a-list-by-greater-than-or-equal-to-date/ but I don't have the Date Filter web part.

How to filter comparing two date attributes?

I am trying to create a report which will display Customer, Customer Request Date, Scheduled Arrival Date and Invoiceable Sell. I want to select this information where the Customer Request Date <= Scheduled Arrival Date. I have been trying various filter combinations, but I cannot get the correct syntax.   Here is my MDX code: SELECT NON EMPTY { [Measures].[Order Lines Invoiceable Sell]} ON COLUMNS, NON EMPTY {[Customers].[Customer].ALLMEMBERS *[Customer Request Date].[Short Date Alpha].ALLMEMBERS * [Scheduled Arrival Date].[Short Date Alpha].ALLMEMBERS} DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [Orders Quotes Projects] CELL PROPERTIES VALUE, BACK_COLOR,FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS    

filter gridview from a dropdownlist with date

having trouble fing any info on what i need to be doing i have tried '{1}'  ,  '#{1}#' , '{1:MM/dd/yyyy}' and a whole bunch of combinations thereof Teh problem is when i get it to actual not have a complie error then the functionality is not correct as i am unable to "select" all from my dropdown list . The only way i have gotten anything close to working is by removinf the % from both the filter and the default value.   here is relevant code   <asp:DropDownList ID="ddlShipDate" AutoPostBack="true" runat="server" Height="16px" Width="75px" DataSourceID="adsPopulateShipDate" DataTextField="dShipDate" DataTextFormatString="{0:MM/dd/yyyy}" DataValueField="dShipDate"> <asp:ListItem Text="All" Value="%"></asp:ListItem> </asp:DropDownList> Pleas enote i removed the append databound items=true<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/JAGENT.mdb" SelectCommand="SELECT [cPronumber], [cCustomerRef], [dShipDate], [cOrigCity], [cOrigState], [dDeliveryDate], [cDestCity], [cDestState] FROM [BillingHistory] WHERE ([cCust

How do you filter a list in a Meeting workspace based on the meeting date?

I have a customer who is using a meeting workspace, and has a list on said workspace (we'll call it "Meeting Instance List"). The workspace houses this list, and of course after each meeting, the workspace, in essence, resets itself in preparation for the next meeting - so it looks like it removes the items from the list, when in actuality, they are there, just on the previous meeting instances. Some of his stakeholders are finding this limiting because they perceive it as losing historical information (you know how some folks can be, if they don't see it, they think it's gone). His solution is to replace the non-series list, with a series list, and incorporate legacy records from another older list. Only problem is, now there's not a way to filter the series list so that it shows items from a parcticular meeting date. For instance - the [Today] variable will only return a current system date value. Surely there ought to be a similar variable that would all you to filter the list based on meeting date, right?

Changing Date format in Filter toolbar


i have added a toolbar to a Data View Web Part and enabled the Filter option. When i click on the filter, the Due Date field displays choices as Saturday, September 11, 2010. Within the DWVP I have the format set to mm/dd/yyyy, the differening formats seem to prevent the filter from working. How I can change the format in the filter dropdown ?

Thanks in advance

Dean MCTS-SQL 2005 Business Intelligence

Calcuate duration between selected date(Filter)



I'm trying to calcucate duration between 2 date sets using paramters.

1. I do have a stored procedure with 2 filter sets. End date and duration.

2. Created SSRS report with 2 filter sets.  End Date and Duration. It worked fine.

3. Customer wants to use Start date and End Date as filter. (I cannot modify stored procedure)

4. I created a dummy parameter for Start Date.

5. Duration default expression as


6. This works as I expected but when they change any date or other parameters, duration calculation does NOT update.


Why it is not updated?




Named Sets vs. Calculated Members and the Filter Field Conundrum (Year-to-Date measures by company c


I’m going to describe our SSAS solution a bit and what I have in it so far in order to ask the question regarding “year-to-date” sales. This is part example and part question, I suppose. "The Filter Field Conundrum" sounds like it should be a high-tech Encyclopedia Brown case or something. Can't seem to find a similar situation through searching, although perhaps I'm wrong and this has been done before.

We have a data warehouse that contains our transactional detail for the last nine or so years. Tables are somewhat analogous to the AdventureWorks solution, with a table for Sales, a table for Customers, Geographic information, etc. The data warehouse has a time table that contains many of the usual bits of information one would expect:

Full Date (mm/dd/yyyy)
Month Number
Month Name
Day of Month
Day of Week
Day of Week Name
Day of Year
Week of Year
and maybe a few other typical fields.

Then we also have:
Working Day (bit, with a 1 indicating that this was a scheduled working day according to our company calendar, and a 0 indicating that it was not)
Working Day of Month
Working Day of Year
(these fields indicate that a day is the nth scheduled working day, according to our company calendar, for a given month or year)

So, for example, 5/1

Need optimisation in Date filter

HI All,
I have to create report on the basis of date filter and i am using SSAS 2008 R2 Cube  for that report.
Now i want to show only Sundays of last six week in that filter may be in drop down manner.

Kindly suggest how to do the same.


Dimension Date filter SCD


I have 2 date fields - AuditStartDate & AuditEndDate in Dimension DimCustomer.

 This has foreign key relationship to DateKey in the DimDate dimension table

In DimDate Dimension table you have the dimension key. Datekey is derived based on date (YYYYMMDD) as integer.

DateKey Date

20101019 19/10/2010

20101020 20/10/2010

I want to filter out records in where AuditStartDate <= Current Date(Converted to (YYYYMMDD) integer) and AuditEndDate >= Current Date(Converted to (YYYYMMDD) integer)

How do I do this in MDX? Please help

Report Builder Filter shows Field as Date Type =Text instead of Date


My Data was created by retrieving ODBC data - using PowerPivot for Excel 2010, and has Birthdate defined as a Data Type = "Date".  This was uploaded to SharePoint, and a New Dataset was created to point at it.

I'm using Microsoft SQL Server 2008 R2 Report Builder 3.0.  I tried to filter this data on Birthdate, but when I go into the Filter, and specify the field that was defined as DataType = "Date" in PowerPivot - Report Builder changes the type to "Text", and gray's out the field so that I can't change it to "Date".

If I create an Expression as Cdate(Birthdate.Value), it lets me change the Data Type to "Date", and works appropriately, but we don't want to have to do this with every date field.

Why doesn't Report Builder see this field as a Date ? 

Date Range filter?


I'm trying to find or build a date range filter template that works with .NET 4.0?

I tried making one based on the decimal range filter from http://dynamicdatafiltering.codeplex.com/, but it looks like these DLLs were built with .NET 3.5 assemblies so I get an error: Type 'ASP.dynamicdata_filters_datetimerange_ascx' does not inherit from 'System.Web.DynamicData.QueryableFilterUserControl'.

Thanks in advance!!

I could probably build one from scratch if I could just see the code for the "ApplyEqualityFilter" function that the other templates are using...ApplyEqualityFilter(source, Column.Name, value)

date range filter in ssrs 2005


i have a graph report created in ssrs 2005 with more that 10 graph which looks at the trend, the report is generated based on selection date which should be a year period but some of the reports should be on current month. i have two parameter @DataFrom and @DateTo in my query and i created a formula Month = DateAdd("d",-30,Parameter!DateTo.Value) what i need is to set a filter on the monthly graph to put something like: Expression : =Field!DateRequired.Value BETWEEN Field!Month.Value to Parameter!DateTo.Value.

hope i make sense

thanks in advance

How to add "date Range" filter in a list of External Content Type



  Does anybody can help to let me know how to add a filter in a list that is external content type ? I created a list has readlist & ReadItem in SPD, but I want this list get data by date range like last 2 weeks. how to set this on filter ?


James Liang

how to filter date from datagridview and create chart based on filtered date?


Dear Expert,

PLease help,

How to filter date in datagridview using two datetimepicker(start and end date) and create a chart based on filtered date?

Take note: Datagridview is located in form1, datetimepicker 1&2 is located in form2, and Chart is located to another form-form3.

Really appreciate your response, suggestions.

Best regards,

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

How To Set a Date Format In GridView Using ASP.NET 2.0

A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.

jQuery Date picker Implementation in ASP.NET

I've posted a wrapper ASP.NET around the jQuery.UI Datepickercontrol. This small client side calendar control is compact, looks nice and is very easy to use and I've added it some time back to my control library.

This is primarily an update for the jQuery.ui version, and so I spend a few hours or so cleaning it up which wasn't as easy as it could have been since the API has changed quite drastically from Marc's original implementation. The biggest changes have to do with the theming integration and the resulting explosion of related resources.

If you want to use this component you can check it out a sample and the code here:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend