Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: sum if Post Reply Post New Topic
Author Message
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Topic: sum if
     Posted: 25 Aug 2009 at 10:51am

Hi, I want to creat a conditional sum in CR10.

I have a column of budget amounts ({glamts.budget1}) which is being compared to a more detailed actual (budget is a single entry per month, and actuals contains many entries per month).  Placing them side by side with a detailed view of the many line items, the budget data is duplicated for every instance in the actuals column. 

I can suppress the duplicates of budget data so that only a single instance is displayed, but when I sum that column, it still sums all the instances (even those suppressed). 

I also have a column of period numbers (periods 1-12 representing months).  I would like to write a formula that only sums the budget instance that corresponds to the first instance of each new month in the period column.

Can someone give me ideas of what that formula might look like? Or, would I be better off with a different approach?

Thanks,

Paul

 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Aug 2009 at 11:14am
You can use  Running Total but it depends on how you have any grouping set up or what the actual values in the month field are as to how to do it.


Edited by DBlank - 25 Aug 2009 at 11:15am
IP IP Logged
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Posted: 25 Aug 2009 at 12:52pm
Thanks DBlank!
 
I used the running total feature to sum the budget field with it evaluating on change in group and reseting on each change in the account these were measures of and it worked!
 
I appreciate the tip!
 
Paul
IP IP Logged
Printable version Printable version

Forum Jump
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