Rows and cells

Each row in a decision table forms a rule.

Each numbered row in a table forms a rule. The values in the cells of the row contain the conditions and actions of the rule:

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A 100,000 300,000 true 0.001

To make rows in a decision table easier to read, you can merge cells with conditions that are common to more than one rule. In the following table, the Grade A cells of rows 1 and 2 have been merged into one cell:

  Grade Amount of loan
Min Max
1 A 100,000 300,000
2 300,000 600,000

You read the two rules as follows:

If a third row is added to the decision table, it can be shown in the following ways:

Otherwise rows

You can use an Otherwise row in case none of the values for a condition are met:

  Grade Amount of loan
Min Max
1 A 100,000 300,000
2 300,000 600,000
3 A Otherwise

Merged or split cells

In condition columns, you can merge or split the cells in subcolumns and change the operator. For example, the third row in the following table is also about Age, but it includes the operator foris more than, which takes only one value, instead of is between, which requires two values:

  Age
Min Max
1 18 25
2 26 40
3 >40

Partitioned cells

A partition is a group of cells in a condition column with a common cell next to them. In the following table, cells A and B in the Grade column each have a partition of cells in the Amount of loan column.

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A <100,000 false
2 100,000 300,000 true 0.001
3 300,000 600,000 true 0.003
4 ≥600,000 true 0.005
5 B <100,000 false  
6 100,000 300,000 true 0.0025
7 300,000 600,000 true 0.005
8 600,000 800,000    
9 ≥600,000 true 0.0075

Each numbered row in the table still forms a rule. Partitioning helps you compare rules with similar conditions, and find overlaps and gaps between values of the rules.

Empty cells

A row can contain empty cells. If an empty cell is in a condition column, the condition is always satisfied. If an empty cell is in an action column, the action cell is ignored.

In the following table, the first rule does not set an insurance rate.

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A <100,000 false
2 100,000 300,000 true 0.001
3 300,000 600,000 true 0.003
4 ≥600,000 true 0.005