Monday, March 26, 2012

Getting sub totals in groups

Hi,
i have a table and a group in it..
i need to have subtotal column..
Im using the cost filed for grouping ...
i need to sum this filed and show it...
it seems that when i use the sum function alone,it sums all the cost values
ignoring the group
example
Project Reg ot Cost total cost
1 2 0 4 8
2 3 0 5 15
totals 5 o 13
isince there are 2 projects with cost 4 ,it sums incorrectly as 13,i
expect it to be 9...
any help please...
Thanks,Try adding a scope to your aggregate =Sum(Fields!Cost.Value, "Group_Name")
--
Douglas McDowell douglas@.nospam.solidqualitylearning.com
"CCP" <CCP@.discussions.microsoft.com> wrote in message
news:D582E6A9-B408-458C-AFC1-EFE709B0BD1D@.microsoft.com...
> Hi,
> i have a table and a group in it..
> i need to have subtotal column..
> Im using the cost filed for grouping ...
> i need to sum this filed and show it...
> it seems that when i use the sum function alone,it sums all the cost
> values
> ignoring the group
> example
> Project Reg ot Cost total cost
> 1 2 0 4 8
> 2 3 0 5 15
> totals 5 o 13
> isince there are 2 projects with cost 4 ,it sums incorrectly as
> 13,i
> expect it to be 9...
> any help please...
> Thanks,
>|||CCP,
If you've got you're group set properly (to project) you shouldn't need
to worry about scope. The sum should be in the group footer. In fact
you shouldn't have to specify 'Sum' at all, just dragging the Cost
field from the field list into a cell on the Group footer will sort the
syntax out for you.
What you are getting looks like you have it set in the TABLE footer,
not the GROUP footer.
Chris
Douglas McDowell wrote:
> Try adding a scope to your aggregate =Sum(Fields!Cost.Value,
> "Group_Name") --
> Douglas McDowell douglas@.nospam.solidqualitylearning.com
>
> "CCP" <CCP@.discussions.microsoft.com> wrote in message
> news:D582E6A9-B408-458C-AFC1-EFE709B0BD1D@.microsoft.com...
> > Hi,
> > i have a table and a group in it..
> > i need to have subtotal column..
> > Im using the cost filed for grouping ...
> > i need to sum this filed and show it...
> > it seems that when i use the sum function alone,it sums all the
> > cost values
> > ignoring the group
> > example
> > Project Reg ot Cost total cost
> > 1 2 0 4 8
> > 2 3 0 5 15
> >
> > totals 5 o 13
> >
> > isince there are 2 projects with cost 4 ,it sums incorrectly
> > as 13,i
> > expect it to be 9...
> >
> > any help please...
> >
> > Thanks,
> >

No comments:

Post a Comment