Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

I have a case here:


In my table I want to display the count of my data with letter that starts with "B".
my sample expression is this:

=CountDistinct(IIF(Left(Fields!Letter.Value,1) = "B",Fields!letter.Value,0))


The problem is all of my values are counted. the result should be:
with letter B = 2
without letter B = 1
but in my case 3 counts are displayed for those with letter B.


please help.
thanks :)

[edit: codeblock styling added]
Posted
Updated 3-Aug-11 22:33pm
v2

1 solution

=Sum(IIF(Left(Fields!Letter.Value, 1) = "B", 1, 0))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900