Metric Formula Overview
Metric Formula
Metric Formula turns the numbers people enter into the numbers the platform works out. You write one calculation against dimensions, not rows and columns, and it applies to every entity, period and product in the model — including ones added later.
Start Here
Read these five pages in order and you will have built a working calculation.
- Glossary — the terms used in this module, so the steps that follow are clear.
- Understand Metric Formula — what one formula consists of, and why it describes dimensions rather than cells.
- Formula Functions — the six functions and which ones you are offered.
- Parameters and Matching — the default matching rule. Most formulas need no parameters once you know it. Read it before you build anything.
- Write Your First Formula — build one, end to end, in eleven steps.
Then use the Scenario Guide for common situations, and read Limitations and Common Pitfalls once before you share a calculation.
The Core Concept
A spreadsheet formula points at cell positions, so it breaks when the grid changes. A Metric Formula points at dimensions: you say “revenue is volume times price” once, and every product, month, entity and scenario is calculated, including new ones. Read more on Understand Metric Formula.
Common Pitfalls
CRITICAL: Parent-member totals are not recalculated: A Formula metric is calculated only where its input data is stored — normally leaf members — and is not recalculated at parent members. A quarter, year or division shows the Summary Method total of the stored values below it — Sum unless you change it. That is right for amounts and wrong for prices, percentages and ratios, and nothing warns you. Set Summary Method to None for those. (This is not the Parent metric type.) See Limitations and Common Pitfalls.
A failed run can leave mismatched data: If a calculation fails part-way, some metrics are recalculated and others are not, and the ones after the failure still run against old values. The sheet looks normal. After any run, check its status in the Task Monitor; on Failed, fix the named metric and rerun. See How Calculation Runs.
Getting the Set direction backwards
Rolling detail up and pushing a rate down differ only in which side carries the property. Reverse them and you double-count or get blanks, with no error. See Parameters and Matching.
Trusting a function because it worked
Function names JustPerform does not convert are passed to the analytics database unchanged, so they can work but behave differently from Excel. See Expressions.
If something is wrong right now
Go to Error Messages and Symptoms. It lists every message with cause and fix, and a second table for when there is no error but the numbers are wrong.
Related modules: The metric itself — types, settings, storage and publishing — is in Metrics.
Understand Metric Formula
Metric Formula is the calculation layer: it derives values from other values. This page shows what one formula consists of and where you author it.
Default matching rule: With no parameters, each input is matched to the output dimension by dimension: the same dimension maps
to the same member, and a dimension only on the input is totalled away. For a dimension only on the
output, a Lookup input is repeated across every member; any other input goes to the default
member. Most formulas need nothing more. See
Parameters and Matching.
A formula describes dimensions, not cells
A spreadsheet formula refers to positions — cell B7, range D2:D400 — so when the grid changes, the formula is wrong or must be redone.
A Metric Formula refers to dimensions. You say “revenue is volume times price” once, and the platform calculates every intersection it applies to: every product, month, entity and scenario. Add a product or a period and it is calculated too.
That is why SUMIF and VLOOKUP are not supported: both are range lookups.
Their jobs — rolling detail up, pushing one rate down to many members — are done by a
parameter that uses a relationship held in master data, so
it keeps working as master data grows.
What one formula consists of
A Metric Formula is three things configured together on one metric:
The Revenue metric
|
+-- Input metrics which other metrics feed this one
| +-- Function how each input's values are treated (Sum, Lookup, Get, Max, Min;
| | Link mirrors one source metric)
| +-- Parameters which slice of each input to use, and
| how its dimensions line up with mine (Set, Filter, Add, Where, Assign, Alias)
|
+-- Expression the arithmetic, in spreadsheet syntax =D2*E2
The expression looks like a spreadsheet formula. The function and parameters do the dimensional work, and they tell a reviewer what the formula is trying to do.
The trade-off
What you give up: There are no ranges — =SUM(D2:D10) does not work. Only a small set of spreadsheet
functions is converted by JustPerform (Expressions). And a
Formula metric is calculated only where its input data is stored (normally leaf members): a parent-member cell shows the Summary Method total
(Configure Metric Settings).
Where you will find it in the product
You work on a formula when you explore the metric: click Explore on the metric in the Metric List, or Explore Metric from a cell in the metric's column. Two related screens are Metric Formula History, which records every formula change, and Publish Metric Formula Changes, where you choose how far back a change applies.
What this module assumes you already know
A formula sits on a metric, and a metric only makes sense once you know sheets, dimensions, members and grain. If those are new, read How Sheets, Metrics and Dimensions Relate in Metrics first.
What Metric Formula Is Not
Other features in JustPerform also calculate. This page shows which tool fits each need, and one naming trap.
Reach for a different tool when you see these
If the requirement is… |
The tool is… |
|---|---|
Translating local currency into reporting currency with closing and average rates |
Currency Conversion, a packaged data action |
Eliminating intragroup trading and applying ownership |
Group Consolidation and Intercompany Elimination data actions |
Spreading shared costs onto consuming cost centres on a driver |
The Allocation data action |
Moving balances between years or scenarios as a triggered step |
The Carry Forward data action — not a rollforward, which is ongoing calculation logic () |
A calculation on a dimension member rather than a metric |
Model Formula, a separate object with its own user-set solve order |
A visual driver model with named nodes calling procedures |
Value Driver Tree / DataForge |
A subtotal that only adds or subtracts other metrics in the same sheet section |
A Parent metric — no expression needed. See The Five Metric Types. |
A range check on what peopletype |
Validations on an Input metric — same Comparer Types as a Control metric, different job |
An alert when a metric crosses a threshold |
An Automation rule, which fires outward; a Control metric flags in the sheet |
A naming trap:Metric Formula lives on a metric, and its run order is worked out automatically. Model Formula is for dimension and member formulas, is deployed from blueprints, and has a solve order you set by hand. They are unrelated. A solve-order field means Model Formula.
It is also not the whole of the metric
A metric's Data Type, its Metrics Type, its Summary Method and how a change is published are properties of the metric, covered in Metrics. A correct formula still shows a wrong-looking parent total if Summary Method is Sum when it should be None.
Three modules, one feature area:
The object: types, settings, storage, publishing. |
|
Metric Formula |
This module: functions, parameters, expressions, scenarios, performance, traceability. |
Opening periods, rollforwards, holding a value constant, date functions. |
If your problem is not a formula at all
A quick test: a step someone runs is probably a data action; a rule that is always true is probably a Metric Formula. Currency Conversion, Allocation and Carry Forward are triggered at a point in the close; a formula has already run by the time anyone looks.