Chapter 13 Managing Reports

Organizing Report Data

Table 13-11 Examples of Functions (continued)

 

Function

Description

Example of use

 

 

 

 

 

COUNT( )

Counts the rows in a table.

COUNT( )

 

 

 

 

 

COUNT(groupLevel)

Counts the rows at the specified group level.

COUNT(2)

 

 

 

 

 

COUNTDISTINCT(expr)

Counts the rows that contain distinct values in a

COUNTDISTINCT([CustomerID])

 

 

 

 

 

 

table.

COUNTDISTINCT([Volume]*2)

 

 

 

 

 

COUNTDISTINCT

Counts the rows that contain distinct values at the

COUNTDISTINCT([CustomerID], 3)

 

(expr, groupLevel)

specified group level.

 

 

 

 

 

 

 

DAY(date)

Displays the number of a day in the month, from 1

DAY([forecastShipping])

 

 

 

 

 

 

to 31, for a date-and-time value.

 

 

 

 

 

 

 

DIFF_DAY(date1, date2)

Displays the difference between two date values, in

DIFF_DAY([checkoutDate],

 

 

 

 

 

 

the number of days.

[returnDate])

 

 

 

 

 

DIFF_HOUR(date1, date2)

Displays the difference between two time values, in

DIFF_HOUR([StartTime],[Finish

 

 

 

 

 

 

the number of hours.

Time])

 

 

 

 

 

DIFF_MINUTE(date1,

Displays the difference between two time values, in

DIFF_MINUTE([StartTime],

 

date2)

the number of minutes.

[FinishTime])

 

 

 

 

 

DIFF_MONTH(date1,

Displays the difference between two date values, in

DIFF_MONTH([askByDate],

 

date2)

the number of months.

[shipByDate])

 

 

 

 

 

DIFF_QUARTER(date1,

Displays the difference between two date values, in

DIFF_QUARTER([PlanClosing],

 

date2)

the number of quarters.

[ActualClosing])

 

 

 

 

 

DIFF_SECOND(date1,

Displays the difference between two time values, in

DIFF_SECOND([StartTime],

 

date2)

the number of seconds.

[FinishTime])

 

 

 

 

 

DIFF_WEEK(date1, date2)

Displays the difference between two weeks as a

DIFF_WEEK([askByDate],

 

 

 

 

 

 

number.

[shipByDate])

 

 

 

 

 

DIFF_YEAR(date1, date2)

Displays the difference between two years as a

DIFF_YEAR([HireDate],

 

 

 

 

 

 

number.

[TerminationDate])

 

 

 

 

 

False

The Boolean False. This function is used in

In the following example, False indicates

 

 

 

 

 

 

expressions to indicate that an argument is false.

that the second argument, ascending, is

 

 

 

 

 

 

 

false and therefore the values should be

 

 

 

 

 

 

 

returned in descending order.

 

 

 

 

 

 

 

RANK([Score], false)

 

 

 

 

 

FIND(strToFind, str)

Displays the index of the first occurrence of

FIND("HQ", [OfficeName])

 

 

 

 

 

 

specified text. The index is zero-based. The search

 

 

 

 

 

 

 

 

is case sensitive and the search string cannot include

 

 

 

 

 

 

 

 

wildcards.

 

 

 

 

 

 

 

 

The value in the strToFind argument must be

 

 

 

 

 

 

 

 

enclosed in quotation marks.

 

 

 

 

 

 

 

FIND(strToFind, str,

Similar to FIND(strToFind, str) but supports

FIND("HQ", [OfficeName], 3)

 

startPosition)

providing a start position for the search. The index

 

 

 

 

 

 

 

 

is zero-based.

 

 

 

 

 

 

 

FIRST(expr)

Places the first value that appears in a specified

FIRST([customerID])

 

 

 

 

 

 

column into the calculated column. This function

 

 

 

 

 

 

 

 

supports viewing a row-by-row comparison against

 

 

 

 

 

 

 

 

a specific value.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

User Guide for Cisco Secure Access Control System 5.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13-54

 

 

 

 

 

OL-24201-01

 

 

 

 

 

 

 

 

Page 418
Image 418
Cisco Systems OL-24201-01 manual Countdistinct, 13-54