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)
 Return data less than day(s)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Constraint Violating Yak Guru

United Kingdom
457 Posts

Posted - 12/18/2012 :  09:52:04  Show Profile  Reply with Quote
Hi

Is someone good with expressions, calculating - days?
I'm trying to return the percentage of calls minus 1 day from todays date, so using the ClosedDate field to query against if any tickets is today dont calculate only previous days where ClosedDate field is stamped.

Here's what I have...the first part works ou first if Number Of Days is less than 3 days and if so devides all calls to get average. I just dont want to include todays calls...


=Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0) and Fields!ClosedDate.Value <= DateAdd("d",-1, GetDate()),"DataSet1")
/Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")

sz1
Constraint Violating Yak Guru

United Kingdom
457 Posts

Posted - 12/18/2012 :  10:00:54  Show Profile  Reply with Quote
Ok sorted it with this:

=Sum(IIF(Fields!NUMBER_OF_DAYS.Value < 3,1,0) and Fields!ClosedDate_DT.Value <= DateAdd("d",-1, TODAY()),"DataSet1")
/Count(Fields!NUMBER_OF_DAYS.Value, "DataSet1")

Thanks
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