How do I calculate SUM(DISTINCT field1) - COUNT (field2)?
I need to calculate RESULT = SUM(DISTINCT field1) - COUNT (field2)
for a group in a SSRS 2005开发者_C百科 report.
DISTINCT
is not allowed in SSRS and if I omit DISTINCT
the SUM
is too high (I have field2 which occurs multiple times within field1).
I know this an old thread, but I hope it help others!
You need to write custom code to apply the aggregate.
For full reference and code please take a look at this post and the answer within the comments section here.
精彩评论