How do I Sum the values of a Count Distinct Aggregate of Contained Groups
I've got a bit of a problem with a grouping. At the moment I have a grouping that does a CountDistinct(Fields!AccountName.Value). This grouping is on a Financial Time Period.
I need to be able to do a Sum on the values brought forward by this CountDistinct at the end of this report, but I can't put an aggregate function within an aggregate function.
Don't suppose you guys have any idea's / help?
Thanks.开发者_如何学Python
You can do a select and aggregate your set of aggregates. Something like:
SELECT sum(total)
FROM (Select count(Fields!AccountName.Value) as total, name FROM x group by name) totals
精彩评论