Joined: 07 Feb 2008
Location: India
Online Status: Offline
Posts: 1
Topic: doing sum after applying group by Posted: 07 Feb 2008 at 5:43am
Hi,
I need to modify a report, need to do sum of some fields by applying group by on some fileds of a table. But, after applying the group by and inorder to do the sum, created a new formula which sums the field of the table. like Sum({TABLENAME.COLUMNNAME}), but prob is this formula is adding all the records, I think it is skipping the group by clause which has added. Please let me know what is the correct way to do it.
Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Posted: 07 Feb 2008 at 7:26am
That's because you're telling the SUM to ignore the group.
If you use SUM( {TABLENAME.COLUMNNAME}, {TABLENAME.GROUPNAME} ), then it will give you the Sum of the values over the current group. If you need to reference this by group in, say, the report footer, you will need to store the values in a global variable.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum