Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional Count inside of Group in .rdlc?

I have a .rdlc report, grouped. Inside each group, I have an Id. Some of them will be positives, and others will be negative. I need the difference between de quantity of positives Id's and negatives Id's

Something like

=CountDistinct(Fields!Id.Value) where Fields!Id.Value > 0 - CountDistinct(Fields!Id.Value) where Fields!Id.Value < 0

How Can I do that ? I'm thinking on a function, but I want to know if there is a simply way

Edit: An Id can be more than once time in each group, that's why I use CountDistinct

like image 251
Gonzalo.- Avatar asked Oct 22 '22 19:10

Gonzalo.-


1 Answers

You can try this:

CountDistinct(IIf(Fields!Id.Value > 0, Fields!Id.Value, Nothing))
like image 102
Mike Avatar answered Oct 30 '22 12:10

Mike