|Cabletron SPECTRUM Appendix 3: SPECTRUM Specific Tips for Reporting|
Formula variables are variables whose values are calculated (from the values of other variables) when you access the data. The values of the formula variables do not occupy disk space in the PDB.
You can add formula variables to PDB tables by using the IT Service Vision server's interactive interface or by using the IT Service Vision %CPDDUTL macro. It is generally preferable to use the %CPDDUTL macro for your production PDB because the macro documents what you did exactly and enables you to add the variables to many tables easily and accurately.
For information on adding a formula variable using %CPDDUTL, see the Macro Reference documentation for IT Service Vision.
Note: The appropriate table to
add the formula variable to is the table that contains the
variables on which the formula variable is based. In addition to
making the Kept status of the formula variable
Yes, remember to
check that the variables on which the formula variable is based
also have Kept status set to
The formula variables UDAY and UWEEK can be useful when reporting on data in your PDB. To create them if they do not already exist:
Administration -> Manage Tables ->select the table -> click right mouse button -> Properties -> General -> Variables
Apply to levelfield.
you choose to define a formula variable for multiple
levels, you must be sure that any variables on which it
is based have a Kept status of
Yes and any statistics on which it is based are
selected at those levels and their base variables have a
Kept status of
Kept in PDBfield.
The Sunday immediately previous to the date in DATETIME.
UWEEK = datepart(datetime) - weekday(datepart(datetime)) + 1;
and then select Check Code. The results of the check display in the message area at the bottom of the SAS window.
.and then select OK. Note that the new formula variable is now on the list of variables.
Repeat these steps to define another formula variable, UDAY, which has the formula:
UDAY = weekday(datepart(datetime));
and the description
number of the day of the week (1-7), where
1=Sunday, and defaults for the
To return to the main window, select Close -> OK -> Close -> OK.
Note: Your views will be rebuilt.
To examine the effect of defining the formula variable, follow this path from the main window:
Administration -> Examine PDB Data -> select a table/level combination that you want to check -> click right mouse button -> View Data
Use the scroll bars to view the UDAY and UWEEK values for each observation (if you have data).
Note: For other browsing methods, see the information on the Print Report Style in the GUI or see the information about the %CPPRINT macro in the Macro Reference documentation for IT Service Vision.
Note: Formula variables do not have selectable statistics. If you want statistics on a formula variable, you must define the statistics as formula variables at the desired non-detail levels.