User`s guide
Administration
->
Manage Tables
->
select the table
->
click right mouse button -> Properties ->
General -> Variables
2. For one formula variable, for instance UWEEK, select Tools and Create Formula. IT Service Vision displays the
Create New Formula window. Type in the variable name UWEEK and select OK. IT Service Vision displays the
Make/Edit Formula window. Select General.
3. Select the levels at which you want the formula calculated. In this case, select Detail, Day, Week, Month, and Year
in the Apply to level field.
Note:
If 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 Yes.
4. Specify the length. In this case, type over the 8 with a 6 in the Length field.
5. Select the data type. In this case, select Numeric in the Type field.
6.
Select the Kept status. In this case, select
Yes
in the
Kept in PDB
field.
7. Specify the label. In this case, type Week in the Label field.
8. Specify the description. In this case, in the Description field type The Sunday immediately
previous to the date in DATETIME.
9. Select Formula Source. If you have questions about what constitutes a valid formula, select Help. You are presented
with a largely blank window with numbers on the left side. Type in the formula to calculate values for the formula
variable; in this case define UWEEK as follows:
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.
10. Select Advanced and provide the subject and format, if applicable. In this case, select the right arrow that is associated
with the Format field, date7., and OK. Edit the format to DATE
. 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 remaining
values.
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.