calc/require-emptymembersets-on
Starts at Warning. It reads Calc Script files in Rules only. A Template or Script is a piece that Deploy places inside a Rule, so the setting belongs to the Rule as a whole.
What it checks
Section titled “What it checks”The Rule must set EMPTYMEMBERSETS itself, with a line such as
SET EMPTYMEMBERSETS ON;.
- Either value passes.
SET EMPTYMEMBERSETS OFF;is a choice you made on purpose, so it clears the finding too. - Case and extra spaces don’t matter.
- A command inside a comment doesn’t count.
When the Rule never sets EMPTYMEMBERSETS, the finding sits on the first line of
the file, because there is no one word to underline.
Why it matters
Section titled “Why it matters”This default is expensive to get wrong. When a FIX uses a member function that
returns nothing (@RELATIVE on an empty branch, a Run-Time Prompt left blank, an
attribute that matches no members), Essbase doesn’t stop. By default it drops the
empty list and carries on, so the statements inside the FIX run with no limit on
that dimension at all. A calculation meant for a handful of entities runs against
every entity instead. In a large application that can mean hours of
processing, and data written where you never meant it to be. With
SET EMPTYMEMBERSETS ON; an empty list means the FIX calculates nothing, and
the Rule moves on.
Example
Section titled “Example”This Rule triggers the finding. If no entity carries the Acquired UDA, the
calculation runs across every entity:
SET UPDATECALC OFF;
FIX("Budget", "Working", "FY26", @UDA("Entity", "Acquired")) "Net Income" = "Revenue" - "Total Expenses";ENDFIXThe message reads:
Set EMPTYMEMBERSETS explicitly. 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. `SET EMPTYMEMBERSETS ON;` is the usual choice.Set it at the top of the Rule and the finding clears:
SET UPDATECALC OFF;SET EMPTYMEMBERSETS ON;
FIX("Budget", "Working", "FY26", @UDA("Entity", "Acquired")) "Net Income" = "Revenue" - "Total Expenses";ENDFIXFix it
Section titled “Fix it”Click the finding in the Problems panel, which takes you to the first line,
then press Ctrl+. (Cmd+. on a Mac) and choose Insert SET EMPTYMEMBERSETS ON;.
The line goes at the top of the Rule, below any comment block that opens the
file.
Adjusting it
Section titled “Adjusting it”Change its level (Error, Warning, Info) or turn it off in the Lint Rules panel, or excuse one file with a Lint Exception.
If a Rule really needs the default behavior, write SET EMPTYMEMBERSETS OFF;
rather than adding an Exception. The finding clears, and the choice is visible in
the Rule itself.