I am doing a CountDistinct(JobItems) in one of my list groups.
In the footer I want to have the sum of each of the CountDistinct I calculated above. I can't do a count distinct for the entire dataset because the JobItem I'm counting can repeat across groups and that would produce the incorrect number.
Note: I'm trying to avoid writing custom code because I have a lot of things similar to this.
Thanks for any help. If you need example data please ask.
This is a classic aggregate-of-aggregate problem. Unfortunately, aggregates of aggregates is not yet supported in SQL 2005. The only thing you can do in this case is to calculate the CountDistinct in your query (make sure to only return it once for each JobItem... return NULLS for the other rows) and then do the sum in the report.
No comments:
Post a Comment