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

Distinct Count is counting Null as 1 CR XI 1

Status
Not open for further replies.

debbiepy

MIS
Jan 19, 2005
43
US
I have a union query in MS Access 07 that unions 3 tables into one. The union query has "" as OpportunityID for the two tables that do not contain an opp ID. The issue is when I perform a distinct count it sums all the blank into 1 distinct count in Crystal REports XI.

How do I get the distinct count summary to ignore the nulls. It is a summary object so I cannot get to the code, or can I, to add Not isnull().
 
In Crystal, create a formula {@null} by opening a new formula and saving and closing it without adding anything to the formula area. Then create a second formula {@OppID} like this:

if {table.oppID} = "" then
{@null} else
{table.oppID}

Then insert your distinctcount on this formula.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top