SSRS and filtering at a field level -


i have dataset number of records unique identifier , "createdate" field. need able filter @ field level determine count of number of records added in last 7 days, not wish filter @ dataset level. have created "calculated" field dataset , having difficulty syntax count records (using unique field "propertyid" count field) counting records create date within last 7 days. expression using created field have named saleslastweek is:-

=iif(fields!createdate.value > =dateadd(dateinterval.day,-7,today()), =count(fields!propertyid.value), 0) 

the error message received is:-

the expression used calculated field '=iif(fields!createdate.value > =dateadd(dateinterval.day,-7,today()), =count(fields!propertyid.value), 0)' includes aggregate, rownumber, runningvalue, previous or lookup function. aggregate, rownumber, runningvalue, previous , lookup functions cannot used in calculated field expressions.

i'm not sure why trying field in dataset. if there's separate record in data each propertyid (and seems there is), can make count grouping on propertyid , expression like:

=sum(iif(fields!createdate.value >= dateadd(dateinterval.day, -7, today()), 1, 0)) 

you won't able in calculated field since uses aggregate function (sum). make field work on record level, 1 or 0.

=iif(fields!createdate.value >= dateadd(dateinterval.day, -7, today()), 1, 0) 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -