Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for Distinct Sum 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
Is it possible to SUM a Distinct value one time only?

For instance:

PFCDutyStatusID = 24
PODHours = 10
SingleDate = 06/21/2010

PFCDutyStatusID = 24
PODHours = 10
SingleDate = 06/22/2010

PFCDutyStatusID = 24
PODHours = 10
SingleDate = 06/23/2010

PFCDutyStatusID = 24
PODHours = 10
SingleDate = 06/24/2010

Can I have it SUM the PODHours for a distinct PFCDutyStatusID one time in my grouping?
 
If you group on the ID field, you can insert a maximum on PODHours at the group level.

-LB
 
I added in two distinct entrys - one with PODHours = 10 and one with PODHours = 16. In my group footers I got back 16 when I would have expected 26.
 
You didn't say you wanted to sum across IDs--I thought you were looking for one number for the ID group. If you are okay with the result in a group footer, then insert a running total that does a sum of PODHours, evaluates on change of ticket ID, and resets on change of your group field (whatever that is).

Or if you need the result in a header, you can try Ken Hamady's suggestion at:


Look for the article calles "Calculating a Distinct Sum..."

-LB
 
lbass -

You really do save people so many headaches. Your help was spot on and I want to express my sincere gratitude. Thank you, Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top