I have a dataset which contains phone data for a given period, i need to filter this data based on the hour of the day so i can use this in a chart which shows the peak periods.
So far, i have this expression:
=Count(IIF(DatePart("h", Fields!CallStart.Value = 7), Fields!ID.Value, 0))
So, what i had hoped this expression would do is replicate this SQL Query:
select * from PhoneData
where MONTH(callstart) = 7 and YEAR(callstart) = 2012 and DATEPART(HH, callstart) = 7
and Direction ='i' and Part1Device not like 'v%' and Continuation = '0'
The month and year are set in the dataset query.
Suffice to say, the expression doesn’t work and i can’t quite figure out why.. any help would be greatly appreciated.
Looks like your closing bracket for the DatePart function is in the wrong place. Try this.