Add the $NATRIGGER property to the variables that use the aggregation map, so that NAs in queried data will cause the AGGREGATE function to execute.

Adding the $NATRIGGER Property to a Variable

Instead of specifying the AGGREGATE function in every command that you want to return aggregate data, you can add a property to the variable so that the AGGREGATE function is executed automatically.

An $NATRIGGER property on a variable indicates that NA values in the queried data will cause a particular action to take place. To trigger an aggregation, a call to the AGGREGATE function is the value assigned to the $NATRIGGER property.

The following commands add the $NATRIGGER property to the sales variable, so that unsolved data will be aggregated using the sales.aggmap aggregation map: