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!

Disticnt Count Summary off by 1 1

Status
Not open for further replies.

fmrock

Programmer
Sep 5, 2006
510
US
Hey Everyone,

I am working on a change to an existing report. Bascily, I need to count the number for accounts that fall into certian catagories.

The Report pulls back all Charges, Payments, and Adjustments posted this year.

I summarize stuff, by what was posted yesterday, Month Todate, and Year to date.

Right now I have the following formula


If {Command.Post_Date} =(CurrentDate-1) Then
{Command.Account}
//Else
// ""

Then I am doing a distinct count on this, however, its counting the blank row and it shouldnt. Do you know of any way figuring out this count correctly?

BTW.. i am using CR9


 
The "" counts as 1. Create a formula {@null} by opening a new formula and saving it without entering anything. Then change your formula to:

If {Command.Post_Date} =(CurrentDate-1) Then
{Command.Account} Else
{@null}

You can use this same technique with numbers by using tonumber({@null}) as the default, and for dates, date({@null})

-LB
 
This worked great. Thanks for the tip Lbass!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top