Saturday, February 25, 2012

Conditional DistinctCount

I want a distinctCount in a group for a criteria. How can i do it
I am doing something like this
=CountDistinct(IIF(Fields!CATE.Value='N'),Fields!ERNR.Value,nothing),
"grpResCat")
Is this right?Try this:
=CountDistinct(IIF(Trim(CStr(Fields!CATE.Value)) = "N", Fields!ERNR.Value,
Nothing), "grpResCat")
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Anand Prabhu" <AnandPrabhu@.discussions.microsoft.com> wrote in message
news:594F0D45-8C6E-4988-A41D-DA03E858EC86@.microsoft.com...
> I want a distinctCount in a group for a criteria. How can i do it
> I am doing something like this
> =CountDistinct(IIF(Fields!CATE.Value='N'),Fields!ERNR.Value,nothing),
> "grpResCat")
> Is this right?
>

No comments:

Post a Comment