Skip to content

Formula Builder

CalcBridge's formula builder enables visual creation of custom calculations using a graph-based approach, eliminating the need to write Excel formulas manually.


Overview

The formula builder provides:

  • Visual Graph Editor: Build formulas by connecting nodes and edges
  • Real-Time Preview: Test formulas against live data before applying
  • Validation: Structural and dependency checks before execution
  • Versioning: Track formula changes with full history
  • Dual Modes: Visual builder for simple formulas, advanced mode for complex expressions
flowchart LR
    subgraph Builder["Formula Builder"]
        NODES["Define\nNodes"] --> CONNECT["Connect\nEdges"]
        CONNECT --> VALIDATE["Validate\nGraph"]
    end

    subgraph Execution["Execution"]
        VALIDATE --> COMPILE["Compile\nFormula"]
        COMPILE --> PREVIEW["Preview\nResults"]
        PREVIEW --> APPLY["Apply to\nWorkbook"]
    end

    style VALIDATE fill:#DBEAFE,stroke:#3B82F6
    style APPLY fill:#DCFCE7,stroke:#22C55E

Key Concepts

Formula Graph

Formulas are represented as directed acyclic graphs (DAGs):

  • Nodes: Operations, values, and column references
  • Edges: Data flow between nodes
  • Ports: Input and output connection points on nodes

Node Types

Type Description Example
column_ref Reference to a data column [par_value]
constant Literal value 100, 0.05
lookup_exact Exact value lookup VLOOKUP equivalent
compare Comparison operation >, <, ==, !=
if Conditional branch IF/THEN/ELSE
and / or Logical operations AND, OR
sum / concat Aggregation SUM, CONCATENATE
expression Raw formula Custom expression

Modes

Mode Description Use Case
Builder Visual node-and-edge editor Simple to moderate formulas
Advanced Direct expression editing Complex formulas with custom logic

Workflow

  1. Create: Define a formula configuration with a name and graph
  2. Validate: Check graph structure and dependencies
  3. Preview: Test against sample workbook data
  4. Apply: Execute the formula against a workbook sheet
  5. Version: Create new versions as formulas evolve

Page Description
Creating Formulas Step-by-step formula creation guide
Versioning Version management, history, and rollback

API Reference