Restrictions
In Varicent Incentives, you can use restrictions to exclude certain records from data sources.
For example, you might not want your calculation results to include every record in the source data table or all of the results from a prior calculation. By defining a restriction, you can limit the records included in the calculation by specifying conditions for their selection. To define the records that are included in your calculated results, you might impose restrictions on sales that include product 2 or transactions that exceed $50,000 and are sold to a customer in New York.
For each restriction, you must define a data source, an operator, and a value to determine whether the restriction must be applied. The following operators are available:
= (equals)
<> (does not equal)
< (is less than)
> (is greater than)
<= (is less than or equal to)
>= (is greater than or equal to)
is empty
is not empty
Restrictions can be defined based on both individual values and sources. For example:
Value: PayeeID = 1234
Source: Payee ID in source 1 = Payee ID in source 2
Restrictions can be added to the main source but can only be constant values, such as Data.Value=10. Main source restrictions cannot involve any attribute from other tables.
To learn more about using restrictions in Incentives, take the Filtering and Joining Data using Restrictions in Incentives course.
Defining restrictions for joined sources
In Incentives, you can define restrictions to join sources based on a point of commonality.
Restrictions for data sources are defined on the Restrictions tab. All sources and restrictions are displayed. By default, restrictions between sources are created automatically. Any text, date, email, or pick list columns that have the same name and column type in the two sources are joined. You can choose to disable the automatic creation of joins.
On the Restrictions tab, expand the source for which you want to define restrictions.
Hover your mouse over the area next to AND and click Restriction.
Tip
If you need to create many restrictions at once, it is faster to click Restriction multiple times and then drag the columns into the empty fields. For example, if you know you need to create five restrictions, click Restriction five times in a row.
Drag the column from the source that you want to restrict and place it in the first field.
Select an operator for the restriction from the drop-down list.
Drag a column from the joined source to the second restriction field to define the restriction.
Defining global restrictions
In Incentives, you can identify the data that should be included in your final result. For example, you can restrict a calculation to show only the sales of a specific product for each month.
A Global Restrictions dynamic panel is displayed at the bottom of the Restrictions tab. You can define the restrictions in this pane that are global and would be applied after all other restrictions in the normal pane or for filters related to anchoring the base data source.
On the Restrictions tab, expand the Global Restriction pane.
Hover your mouse over the area next to AND and click Restriction.
Drag a column on which you want to restrict from the data source to the first field on the Global Restriction pane.
For example, drag the ProductID column to the Product table source.
Select an operator from the drop-down list.
For example, select the equal operator.
In the second field of the restriction, perform one of the following actions:
To select a value from the selected column to define the restriction, click in the second restriction field and select the value.
Drag a column on which you want to restrict from the data source to the first field on the Global Restriction pane.
Multiple restrictions that use AND or OR groups
In Incentives, if you need to get two sets of results in one object, you can use OR
within AND
restrictions.
For example, you can show all data that is either Product ID 001 and Payee ID Huddle or all data that is Payee ID 001 and Payee ID Young.
- AND Groups
When multiple restrictions are defined, they are separated with an
AND
operator by default. For example, if you define the following restrictions, you get results for payee 1234 in January:Payee ID = 1234
Month = January
- OR Groups
You can use
OR
groups to define the following type of restriction: Payee ID = 1234 or Payee ID = 3456.
Adding AND or OR groups in restrictions
In Varicent Incentives, you can define multiple restrictions for your results by adding AND or OR groups.
On the Restrictions tab, expand the data source that you want to create an AND or OR group for.
Hover your mouse over the area next to AND, and select one of the following options:
Option
Description
AND group
Both or all defined restrictions in the group are applied to the data.
OR group
Data where any restrictions in the group are true is retrieved.
Define the restrictions.