Help - What-If Scenario Comparison (compare)

Click here to open the calculator: What-If Scenario Comparison

What-If Scenario Comparison

Purpose

What-If Scenario Comparison evaluates an expression for several input scenarios and presents the results in a table and grouped bar chart.

Inputs

Expression

The expression or calculator call to evaluate for every populated value column. The default is:

x + y

Vary By

Select what the discrete values vary:

  • Parameters (p) replaces named parameter values inside a calculator or function call.
  • Variables (v) replaces standalone variables in an expression, such as x + y * z.

Use Parameters for calculator or function arguments and Variables for direct expression variables. The default for Compare is Variables.

Input Table

Use exactly these input columns:

Variable | V1 | V2 | V3

Enter one variable name per row in Variable, and enter its value for each discrete case:

Variable  | V1 | V2 | V3
x         |  1 |  2 |  3
y         |  2 |  3 |  4
z         |  3 |  4 |  5

This represents three evaluations: V1 uses x=1, y=2, z=3, V2 uses x=2, y=3, z=4, and V3 uses x=3, y=4, z=5. Parameter names must be unique valid variable names. A value column may be entirely blank, but a partially filled value column is invalid. Put any unit context in the expression; table entries are the discrete values.

Value syntax

Each input cell can be either:

  • a plain value (5, -3, 0.8) for direct replacement, or
  • a relative operation applied to a base value.

Supported relative forms:

  • 5(+): add 5 to the base
  • 5(-): subtract 5 from the base
  • 2(*) or 2(x): multiply the base by 2
  • 2(/): divide the base by 2
  • 80% or 80(%): take 80% of the base (base * 0.80)
  • +10% or -5%: apply percentage change (base * 1.10, base * 0.95)

How base values are chosen:

  • Vary By = Parameters (p)
    The base is read from the numeric value already present in the expression for that parameter. Every populated column (V1, V2, …) may use relative syntax.

  • Vary By = Variables (v)
    The first populated value column is the base column and should contain plain values. Relative syntax is supported in later populated columns and is always applied against the base column values (not against previous columns). If a later column has a plain value, that value is used directly for replacement.

Table Columns

Optional result columns to include in the output table. The input parameter columns are included with the selected calculated result columns.

Table Units

Optional result units to include in the output table. This is an alternative to naming result columns explicitly. For example, enter kg to include all calculated result columns whose unit is kilograms. Multiple units can be separated by commas.

Chart Columns

Optional result columns to display in the grouped bar chart. Each selected result column becomes a bar series, with V1, V2, and V3 as categories.

Chart Units

Optional result units to include in the grouped bar chart. This is an alternative to naming chart columns explicitly; for example, USD selects all chartable result columns with that unit. Multiple units can be separated by commas.

Column and unit filters can be used together. A result is included when it matches one of the supplied column names or units.

Show

Choose whether to display the table, chart, or both.

Chart Title

The title displayed above the comparison chart.

Results

The result table has one row per successfully evaluated value column. Its first column, Variation, contains the corresponding input-table label (V1, V2, or V3) so that each result row can be cross-checked directly against the input. It then shows the input values for each variable followed by the selected result columns. When relative syntax is used in the input table, the table shows the resolved numeric values used during evaluation. The chart uses grouped vertical bars to compare the selected results across the discrete cases.

If a case cannot be evaluated, that case is omitted. If no case produces a numeric result, the calculator raises an error.

Example

With Vary By set to Variables, evaluate:

x + y * z

using the table above. The results are 7, 14, and 23 for V1, V2, and V3.

Interpretation

Compare is a deterministic discrete-case comparison. Use Redo for a generated continuous range and Monte Carlo for randomly sampled uncertainty.