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!

Condition on Summarised Field

Status
Not open for further replies.

waldopepper

Programmer
Nov 21, 2003
124
GB
Hi - I have a summarised field - just a count of orders grouped by client.
I want to add another (summarised by group) count next to it but for records within a certain date range - how do I put a condition on a summary?

(CR9)
thx
W
 
Create a formula at the detail level:

if {table.date} in Date(2004, 01, 01) to Date(2004, 01, 31) then 1 else 0

Then insert a SUM (not a count) on the formula. This will work unless you have duplicate records.

-LB
 
I assume you mean more than record for each date - then yes, I have duplicate records.

thanks anyway
Any other ideas anyone?
 
No, that isn't what I meant. By duplicate records, I mean a situation where the field you are counting inappropriately repeats because of table joins, for example. If each record represents a distinct occurrence, i.e., you really do want to count every record that appears in your details section, even if it is on the same date as another record, the above should work.

-LB
 
Ah I see - got the wrong end of the stick. I've worked this into the report and it works fine.
Thanks again.
W
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top