Creating and Editing Virtual Data Rules
As a System administrator you can create new Virtual Data Rules (VDR) or edit existing rules from the Virtual Data Rules browse grid (Admin → Virtual Data Rules).
New VDRs
To create a new VDR, click the “Create New” button.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%2011.50.52%20am.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
In the Virtual Data Rule Editor you can give the rule a name, describe its purpose, and select the data type and measure the rule is intended to populate.
![](../__attachments/3469705466/VDR%20Name%20-%20Blank.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
After completing the “General Info” tab, choose the “Rule Formula” tab to build your rule.
The left side of the editor lists the available building blocks of your formula, while the right side shows the elements selected.
![](../__attachments/3469705466/VDR%20Formula%20-%20Blank.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
Measures
The first building blocks to consider are the measures. Measures are the individual components or fields of data types that contain data that is accumulated monthly. Most consumption data types contain at least a consumption measure and a cost measure. The list of available measures shown depends on the account styles that are enabled for your organization.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.22.51%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
To a select a measure, click the blue plus (+) icon to add it to the right side.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%202.17.59%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
From there, click the pencil icon to change the name or update the behavior of the variable.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%202.18.10%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
The aggregation method is relevant if the variable is populated by multiple accounts or meters. Depending on your selection, the monthly data from the various sources can be summed, averaged, or use the maximum or minimum value of those supplied.
Operators
Operators are the basic math operators that help frame the formula. These include plus, minus, multiply, divide, and brackets.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.29.43%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
Attributes
Attributes for various entities can be used in your formula if the attribute is numeric.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.31.29%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
Value
Using the Value variable you can insert numbers directly into your formula.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.40.16%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
Click the plus icon to add a Value Variable and then on the right-hand side click the pencil icon to edit it and set the default value to the desired number.
![](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.42.21%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
It is a good idea to also rename each value variable to the number being captured so that the formula summary is clearly understood without having to interrogate the individual variables. For example, if you are inserting the number 0.1 or 10% into your formula, rename the value variable '10 percent'.
Special characters such as +,-,*,/,%,#,$,@ and others are not allowed in variable names. If you need to include any of these for clarity, write out the word such as 'percent' instead of the % symbol.
Formula Preview
The formula preview validates that the formula does not use special characters and follows a proper order of operations, while also giving a clear picture of the formula constructed in the right panel.
![Right panel](../__attachments/3469705466/Screenshot%202023-07-31%20at%202.44.38%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
![formula preview](../__attachments/3469705466/Screenshot%202023-07-31%20at%201.52.24%20pm.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)
Existing VDRs
Existing VDRs can be edited after they are created. However, if a VDR is being used by Virtual Accounts, then the changes that are allowed are limited to modifying the naming and behavior of the existing variables. New variables cannot be added and existing variables cannot be deleted. These limitations are in place so that editing the rule does not break any of the virtual accounts that are already configured using this rule. If you need to make changes that include adding or removing a variable then a new rule needs to be created.
To edit an existing VDR, select the VDR and r-click (or click the “Actions” button) and select “Edit Rule”.
![](../__attachments/3469705466/Screenshot%202023-08-01%20at%2010.54.40%20am.png?inst-v=d3135700-4bfe-4b61-b559-9eb5bd947a54)