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

SUM() x 2 Condition..??

Status
Not open for further replies.

dafty

Programmer
Jul 21, 2001
40
0
0
TH
can the "SUM()" function have 2 condition to grouping...

----------------------------------
[daftywork : work 4 everyone.]
>>
 
Please post what you're trying to do, perhaps someone can
then help.

From CR help:

Count({orders.ORDER AMOUNT}, {orders.ORDER DATE}, "monthly")

Counts the number of orders in each group of orders in the Amount field (the total orders for each month). The orders are separated into groups whenever the value in the Date field changes to a new month.

DistinctCount({orders.CUSTOMER ID}, {orders.ORDER DATE}, "weekly")

Counts the number of different customers contacted, follow up contacts are excluded. Customers are separated into groups whenever the value in the Date field changes to a new week.

The following example is applicable to Crystal syntax:

(SummaryFunction({orders.ORDER AMOUNT}, {orders.ORDER AMOUNT}, "monthly")) % (SummaryFunction({order.ORDER AMOUNT}))

Groups values in the Amount field by month, summarizes the values for each month group, and shows those values as a percentage of the summary value for the entire report.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top