When a spreadsheet contains a restriction/filter on the rows, and the **Spread | Restrict/Filter | Subset on Update** option has been selected, any calculated columns will not match the length of the columns within the spreadsheet. Therefore attempting to add a calculated column to the spreadsheet will fail unless either the restriction is removed and reapplied afterwards, or a subset of values is inserted into the appropriate cells in the calculated column, leaving missing values in the excluded rows.

Note that if the **Spread | Restrict/Filter | Subset on Update** option is not selected you will be prompted with a restriction warning.

## When calculating column

Remove subsetting and calculate values for all rows |
Remove the current restriction from the spreadsheet and calculate all values. The current restriction will be lost. |

Remove subsetting from columns and then reapply it |
Calculate all rows in the column and then reapply the original restriction to the spreadsheet. |

Calculate subsetted values only and leave other values missing |
Only values included in the restriction will be calculated, all other rows will contain missing values. |

## See also

- Restrict/Filter Menu
- Calculations Menu
- Restriction warning when calculating spreadsheet columns

The CALCULATE and RESTRICT directives can be used in the command language.