Monday, March 19, 2012

Check for existence of specific value in a dataset

How do I check for the existence of a specific value in a column in a
dataset? For example, I have 'dataset' with 'columnA' and I want to find out
if ANY row in that dataset has a 'columnA' of value 'valueA'. Seems simple
but I'm having trouble. Thanks.
StephanieOn May 22, 12:42 pm, Stephanie <Stepha...@.discussions.microsoft.com>
wrote:
> How do I check for the existence of a specific value in a column in a
> dataset? For example, I have 'dataset' with 'columnA' and I want to find out
> if ANY row in that dataset has a 'columnA' of value 'valueA'. Seems simple
> but I'm having trouble. Thanks.
> Stephanie
The closest thing to the functionality you want is with and expression
similar to this:
=Max(iif(Fields!columnA.Value = 'valueA', 1, 0))
So if the value exists in the column values, the expression will
return a 1. Otherwise, it will return a 0.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment