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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate Running total for each month

Status
Not open for further replies.

veronic

Programmer
Apr 6, 2004
73
US
I need to count (or sum) date field which is not null and subtract another final date field based on each month.
report grouped by months

Thank you very much
 
Try a formula:

If not(isnull({table.date})) then
{table.date}-{table.date2}
else
0

Since count and sum are different, I assumed that you wanted the sum of the days difference, not a count of the rows which are not null.

To get a not null count, use:

If not(isnull({table.date})) then
1
else
0

In both cases, place the fields in the details and select insert->summary->sum

All of this assumes that you've done a Insert->Group->Select the date and select for each month

-k

-k
 
I tried
@Month:
if not(isnull({FACTS_REPORTS_MAILOUT.OPEN_DATE})) then
count({FACTS_REPORTS_MAILOUT.OPEN_DATE}) - {@Close}

and
{@Close}:
if{FACTS_REPORTS_MAILOUT.BALANCE_DUE} <> 0.00 then 1
else 0

when I put @Month in the report it return every time same figure for each month...
 
Sorry

@Month:
if not(isnull({FACTS_REPORTS_MAILOUT.OPEN_DATE})) then
count({FACTS_REPORTS_MAILOUT.OPEN_DATE}) - sum({@Close})

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top