calc/require-emptymembersets-on
Severity warning by default. It runs on calc-script bodies (.csc) in Rules
only. A Script or a Template is a fragment that Deploy inlines into the Rule that
invokes it, so the setting belongs to the Rule as a whole rather than to any one
fragment, and this rule never fires on either one.
What it checks
Section titled “What it checks”The Rule body must contain SET EMPTYMEMBERSETS ON; somewhere. Matching is
case-insensitive and whitespace-tolerant. A commented-out command does not
count. When the command is missing, the warning is reported once at the top of
the file.
Why it matters
Section titled “Why it matters”This default is expensive to get wrong. When a FIX uses a
member function and that function returns nothing, @RELATIVE on an empty
branch, a Run-Time Prompt the user left blank, or an attribute that matches no
members, Essbase does not stop. By default it discards the empty member set and
carries on, so the statements inside the FIX execute with no restriction on
that dimension at all. A calculation you meant to run on one entity’s level 0
descendants runs against the entire cube instead. In a large application that
means hours of processing, blocks created where you never intended data, and a
cleanup that is far harder than the original calculation. Setting
EMPTYMEMBERSETS to ON changes the outcome to the one you expect: an empty
member set means the FIX calculates nothing, and the Rule moves on.
Example
Section titled “Example”This Rule body triggers the warning. If @RELATIVE returns no members, the
assignment lands on every block in the cube:
SET UPDATECALC OFF;
FIX(@RELATIVE("Entity", 0)) "Net Income" = "Revenue" - "Total Expenses";ENDFIXThe message reads:
Add `SET EMPTYMEMBERSETS ON;`. Without it, a FIX whose member set resolves to nothing is ignored and the statements inside it run against the whole cube instead of against nothing.Add the command to the header:
SET UPDATECALC OFF;SET EMPTYMEMBERSETS ON;
FIX(@RELATIVE("Entity", 0)) "Net Income" = "Revenue" - "Total Expenses";ENDFIXAdjusting it
Section titled “Adjusting it”Change its severity or turn it off in the Validation Rules panel, or exempt one artifact with an Exception.