开发者

How do I calculate SUM(DISTINCT field1) - COUNT (field2)?

开发者 https://www.devze.com 2023-02-13 22:30 出处:网络
I need to calculate RESULT = SUM(DISTINCT field1) - COUNT (field2) for a group in a SSRS 2005开发者_C百科 report.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消