Am having trouble getting an expression to work that performs a count on a
different datset within a table. Firstly is this possible. In other words
table is based on dataset a but i want to have a colum that counts a field in
dataset b based on criteria. (ie field = 174). ThanksJust try this:
=Sum( iif(Fields!SomeFieldNameFromDatasetB.Value = 174, 1, 0), "b")
Note: If your condition is more complex and based on the current value of a
field in dataset A, then you have to work with subreports and pass the field
value from dataset A as parameter to the subreport.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tango" <Tango@.discussions.microsoft.com> wrote in message
news:6AA0A8A4-17EC-40E0-92FC-1E91D3932219@.microsoft.com...
> Am having trouble getting an expression to work that performs a count on a
> different datset within a table. Firstly is this possible. In other words
> table is based on dataset a but i want to have a colum that counts a field
in
> dataset b based on criteria. (ie field = 174). Thanks|||thanks robert ill try it in a sec, what does the lower case 'b" do.
"Robert Bruckner [MSFT]" wrote:
> Just try this:
> =Sum( iif(Fields!SomeFieldNameFromDatasetB.Value = 174, 1, 0), "b")
> Note: If your condition is more complex and based on the current value of a
> field in dataset A, then you have to work with subreports and pass the field
> value from dataset A as parameter to the subreport.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Tango" <Tango@.discussions.microsoft.com> wrote in message
> news:6AA0A8A4-17EC-40E0-92FC-1E91D3932219@.microsoft.com...
> > Am having trouble getting an expression to work that performs a count on a
> > different datset within a table. Firstly is this possible. In other words
> > table is based on dataset a but i want to have a colum that counts a field
> in
> > dataset b based on criteria. (ie field = 174). Thanks
>
>|||The lower-case b is the name of the second data set (which represents the
scope for the aggregate function). Every aggregate function has an optional
scope parameter.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tango" <Tango@.discussions.microsoft.com> wrote in message
news:4D0E11A9-ED32-4703-8131-CFC61B671BC0@.microsoft.com...
> thanks robert ill try it in a sec, what does the lower case 'b" do.
> "Robert Bruckner [MSFT]" wrote:
> > Just try this:
> > =Sum( iif(Fields!SomeFieldNameFromDatasetB.Value = 174, 1, 0), "b")
> >
> > Note: If your condition is more complex and based on the current value
of a
> > field in dataset A, then you have to work with subreports and pass the
field
> > value from dataset A as parameter to the subreport.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Tango" <Tango@.discussions.microsoft.com> wrote in message
> > news:6AA0A8A4-17EC-40E0-92FC-1E91D3932219@.microsoft.com...
> > > Am having trouble getting an expression to work that performs a count
on a
> > > different datset within a table. Firstly is this possible. In other
words
> > > table is based on dataset a but i want to have a colum that counts a
field
> > in
> > > dataset b based on criteria. (ie field = 174). Thanks
> >
> >
> >
No comments:
Post a Comment