Previous Topic: Variable Options

Next Topic: RANGE Option-Test Range Criteria

DIFF Option—Percentage of Change Between Time Intervals

You can organize tabular reports by time or date. Use the DIFF option to create a column displaying the percentage of change in the value of a variable between each time interval. The percentage of change is calculated with the following formula:

((current value - previous value)/previous value)*100

DIFF command has the following syntax:

DIFF

The following commands use the DIFF option to display the percentage of change of transaction usage. The HDR2 option assigns an appropriate column heading.

EACH 1 DAY
TAB DATE TRAN USE AND,
 TRAN USE DIFF HDR2(%CHANGE)
 END
RUN

A report like the following is generated:

TRAN TRAN DATE USE %CHANGE -------- ---------- ---------- 01/08/08 15,765 01/08/08 22,165 +40.5% 01/04/08 66,374 +199.4% 01/05/08 91,302 +37.5% 01/06/08 2,535 -97.2% 01/07/08 2,123 -16.2% -------- --------- ---------- PERIOD 200,264 -------- --------- ----------

The difference between the number of transactions executed in the first interval and the second interval is 6400 (22,165 - 15,765). The difference is a 40.5 percent increase (6400 / 15,765 = 40.5 percent).