Choosing Formula Patterns

by gopigment6fec49f4ce9dNo license22 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 2 days ago

Planning skill. Use before writing formulas to decide which patterns and modifiers are needed for the use case. Maps business requirements to formula pattern combinations.

AI-generated overview

Planning guide that maps business requirements to formula pattern combinations before formulas are written.

What it does
This skill provides a decision framework that maps business requirements to the formula patterns and modifiers needed for a use case. It covers aggregation, actual-versus-plan reporting, driver-based forecasting, roll-forwards, time offsets, allocation, gating, dimensional rollups, and access rights. It also points to related execution skills for syntax, modifiers, functions, performance, and iterative cycles.
When to use it
Use it before writing formulas, when you need to decide which pattern combinations and modifiers a business requirement calls for. It is intended as a planning step ahead of implementation skills.
Requirements
Instructions only; no scripts. It references other skills by name but requires no tools, packages, or credentials beyond the agent.

Choosing Formula Patterns

Load this skill before writing formulas. It maps business requirements to the pattern combinations you need, then points you to the execution skills for implementation.

Decision Framework

Business RequirementPatterns to CombineKey Modifiers / Functions
Pull actuals from transaction dataTL aggregation via the list's Month propertyBY SUM/AVG over 'TL'.'Month' + ITEM
Actual vs Plan in one metricVersion time windows + unified reportingIF('Is_Actual', ..., ...) with Is_Actual/Is_Plan booleans
Driver-based forecastingSWITCH engine + growth assumptionsSWITCH on method ID + Is_Plan guard
Single-metric roll-forward (cash, one balance line)Compounding chain in one metricPREVIOUS(Month) + IFDEFINED seed
Multi-metric balance roll-forward (inventory, cash, loan balances)Cross-metric iterative chain — load skill:iterating-with-previous-and-cycles, create the cycle before writing PREVIOUSOF formulasPrior-period ending via PREVIOUSOF('Ending …'); ending = beginning + inflows − outflows — not PREVIOUS(Month) or [SELECT: Month - 1]
Prior year baselineTime offset lookup[SELECT: Month-12] (not PREVIOUS)
Grow a prior-year baseline by a rate on top on data by MonthTime-dimensioned assumption + broadcast[SELECT: Month-12] × (1 + 'Growth %'[BY CONSTANT: Month.Year])
Allocate annual total to monthsPeriod allocation[BY SPLIT: Month.Year] (not BY CONSTANT)
Replicate a rate/flag to all monthsConstant broadcast[BY CONSTANT: Month.Year]
Override-first stagingManual override priorityIFBLANK('Override', 'Calculated')
Gate values to plan periods onlyPlan gatingIF('Is_Plan', expr, BLANK)
Date-range presence (active periods)Temporal presencePRORATA(Month, Start, End+1) + ISDEFINED
Aggregate by property hierarchyDimensional rollup[BY: Dimension.'ParentProperty']
Aggregate with mapping metricMapped allocation/rollup[BY Method: SourceDim -> MappingMetric]
Cross-app data consumptionLibrary references'SourceApp'::'Metric' + RESETACCESSRIGHTS on PULL
Fill gaps in time seriesForward fillFILLFORWARD('Input', Month) as cleaning layer
"In/for a specific period or item" (target keeps that dimension)Point-in-time lookup, sparse[FILTER: Dim = 'Dim'."Item"] — not [SELECT: ...][ADD CONSTANT: ...], which broadcasts the value to every item on that dimension instead of restricting to just this one
Collapse a dimension entirely by a flag (target drops that dimension)Selective extraction[SELECT: Account.'IsRevenue']
Tiered/banded lookup (tax brackets, commissions)Segmentation patternIF + [REMOVE FIRSTNONBLANK: Tier]
Access rights metricSecurity formulaIFDEFINED('Users roles', ACCESSRIGHTS(...)) with BLANK for denied

What to Read Next

For domain-specific pattern combinations (OPEX, Workforce, Revenue, P&L, FX, Balance Sheet), see skill:solving-financial-planning and skill:solving-workforce-planning. For inventory and supply chain roll-forwards, read skill:solving-supply-chain before writing formulas.

  • skill:writing-pigment-formulas — syntax reference
  • skill:using-formula-modifiers — modifier mechanics
  • skill:using-formula-functions — function signatures
  • skill:writing-performant-formulas — pre-delivery checklist
  • skill:iterating-with-previous-and-cycles — PREVIOUS/PREVIOUSOF cycles

Source and attribution

Source:gopigment/ai-pluginsinskills/choosing-formula-patternsat commit6fec49f

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal