February 1, 2015 at 10:52 pm
Hi All,
I need assistance in building SSRS expression to find count of records between two dates. below are my conditions:
1. Submitted Date = Today and Submitted Date <= Today()- 30
2. Submitted Date >= Today()-31 and Submitted Date <= Today() - 60
3. Submitted Date >= Today()-61
February 2, 2015 at 2:25 am
Your conditions look wrong, you cannot have a date that equals today and is less than 30 days ago!
You can use sum and iif in an expression to count rows, ie
=SUM(IIf(SubmittedDate>DateAdd(DateInterval.Day,-60,Today) AND SubmittedDate<DateAdd(DateInterval.Day,-30,Today),1,0))
Far away is close at hand in the images of elsewhere.
Anon.
February 2, 2015 at 2:32 am
Actually I am looking for something like "Between" operator in transact query... in short
select count(*) from table where CAST(submitteddate AS DATE) between '2015-02-02' and '2015-01-01'
Not sure if my below code is correct:
=Count(iif(DateDiff("d",SubmittedDate,Now()) And DateDiff("d",SubmittedDate,Now()) <= 30,0,NOTHING))
February 2, 2015 at 3:53 am
Try
=Sum(IIf(DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)<=30,1,0))
Far away is close at hand in the images of elsewhere.
Anon.
February 2, 2015 at 11:38 pm
Hi David,
how to find count of the records for dates between today()-31 and today()-60?
February 3, 2015 at 1:43 am
Sum(IIf(DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)>=31 AND DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)<=60,1,0))
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy