I'm trying to count how many incidents have been created TODAY
, for the WEEK
, YEAR
and TOTAL
.
I've been able to get the TOTAL using:
=Count(Fields!Issue_ID.Value, "My_Data_Set")
but I have not been successful getting the total COUNT for how many incidents have been created for: TODAY, WEEK, YEAR against IncidentDateTime
field.
Use these expressions.
For today:
=SUM(IIF(Fields!IncidentDateTime.Value=Today.Date,1,0),"DataSetName")
For Year:
=SUM(IIF(YEAR(Fields!IncidentDateTime.Value)=Today.Year,1,0),"DataSetName")
For Week:
=SUM(IIF(DATEPART(DateInterval.WeekOfYear,Fields!IncidentDateTime.Value)=
DATEPART(DateInterval.WeekOfYear,Today),1,0),"DataSetName")
For Month:
=SUM(IIF(MONTH(Fields!IncidentDateTime.Value)=Today.Month,1,0),"DataSetName")
Let me know if this helps.