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

Crystal Reports - Distinct Count Formula

Status
Not open for further replies.

DebbieT

Technical User
Dec 20, 2005
1
US
I need to write a distinct count formula to count access as 1X per day. My formula currently looks like this:

DistinctCount ({CARD_ACCESS_HIST.DATE_TIME})

I've looked at the online help and really don't understand the syntax I've been given. It says I need to have a "condFld, cond" to follow the field.

Any kind of help you can provide would be greatly appreciated!

Debbie
 
Create a formula {@date}:

date({CARD_ACCESS_HIST.DATE_TIME})

Then create a second formula:

distinctcount({@date})

This would count the number of distinct dates at the report level. If you wanted to count per group, then you would use:

distinctcount({@date},{table.groupfield})

The 'condFld' refers ONLY to a group field, and the 'cond' is used only for groups based on date, where you need to specify the date interval, e.g., "Annually", "Monthly", etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top