Conditional Statistical Operator

The item conditional statistical operator returns a yes or no answer indicating if the specified comparison is true or false.

Syntax

COMPARISON STATEMENT : item [other conditional statistical operators ] ;|.

Usage

In a script, the item operator is placed after a list item that is compared to a specified value. The item operator is separated from the comparison by a colon.

There is an important difference between the item statistical operator (described on the preceding page) and the item conditional statistical operator. The item statistical operator tells DataEase to include the list item in the report output when other statistics are specified. The item conditional statistical operator tells DataEase to evaluate a comparison and return a yes or no answer indicating if the comparison is true or not.

Example

TOTAL DUE : item min max sum ;

This script tells DataEase: (1) Process all the MEMBERS records in alphabetical order by LAST NAME, (2) list each member's TOTAL DUE (item), (3) list the smallest TOTAL DUE (min), (4) list the largest TOTAL DUE (max), (5) list the total of all the TOTAL DUE amounts combined (sum), and (6) for each member specify a yes or no answer indicating if the member's TOTAL DUE is greater than $100 (item conditional statistical operator).

Although the fourth line in the script tells DataEase to include the TOTAL DUE value in the report output, you must repeat the fieldname as part of the comparison statement to generate the YES or NO data in the output.

The output from this script might look as follows:

Last Name |
Total Due |
Total Due over $100 |

Adams |
$85.00 |
NO |

Albert |
$120.00 |
YES |

Anders |
$120.00 |
YES |

Andersen |
$70.00 |
NO |

Anderson |
$115.00 |
YES |

... |
... |
... |