Logical

Same IF condition in several line items

When three or more line items in a module test the same IF condition, move it into one boolean line item and reference that.

What MaxCheck detects

The same IF condition in 3 or more line items of one module. Conditions are compared as normalized tokens, so "Revenue > 0" and "Revenue > 100" differ. A condition that is just a boolean line item is skipped.

Why it hurts

The condition is calculated again in every line item, and a change has to be made in every copy.

Example

Taken from the rule's own test cases: formulas it must flag, and formulas it must not.

WarningFlags this(three line items, spelled differently)

Module 1
  • WarningItem 1
    IF Revenue > 0 THEN 1 ELSE 0
  • WarningItem 2
    if 'Revenue'>0 then 2 else 0
  • WarningItem 3
    IF (Revenue > 0) THEN 3 ELSE 0

Fine (same left side, different thresholds)

Module 1
  • Item 1
    IF Revenue > 0 THEN 1 ELSE 0
  • Item 2
    IF Revenue > 100 THEN 2 ELSE 0
  • Item 3
    IF Revenue > 1000 THEN 3 ELSE 0

How to fix

Move the condition into its own boolean line item and use that in the IFs.

Severity
WarningCounts toward the area score.
Area
Logical
Runs in
Full analysis only
Rule ID
L_REPEATEDCONDITIONS
Version
Rule 1.0.0, rule set 1.4.0
Planual
2.02-03 Evaluate use of repeated expressions carefullyon Anaplan's Formulas page

Does your model do this?

Upload the line-items blueprint. This rule runs in the full analysis, with a work email.

Check your model