Document Setup · Part 3

Measures and Calculated Measures

Measures are the kinds of sales figure a document keeps. Calculated measures are worked out from them. This guide covers every column of both lists, number formats, and how to write a calculation.

Measures

A measure is one kind of figure: value sales, unit sales, distribution, rate of sale, price. A document keeps each measure for every product, in every outlet, for both periods and both years (see Part 1).

Different organisations buy different data, so they have different measures. A supplier with market data might have these:

CodeShort descriptionLong description
VALUEValueValue Sales
UNITSUnitsUnit Sales
WTDWeightedWeighted Distribution
UNTROSWUnit Rate of Sale (W)Weighted Unit Rate of Sale
PRICEPricePrice / Unit
The code is what everything else goes by. Sales import templates, table columns, labels, highlights and calculations all name a measure by its code. Change a code in a working document and each of those stops finding it. Agree the codes once, set them as your defaults, and leave them.

The columns

Open Edit › Edit Document and click Measures. Each measure is a row.

ColumnWhat it is
CodeThe measure's short code, in capitals and digits with no spaces. No two measures can share one.
Short DescriptionThe name used where space is tight, such as a column header.
Long DescriptionThe full name, used in menus and tooltips.
HideTick to leave the measure out of the sales figures shown in the product editor. The document still keeps it.
PresetA number every figure of this measure starts as, before any data is imported. Nearly always left empty.
CalculationEmpty for a measure that is imported. Filled in for one worked out from other measures, as below.
FormatHow many number formats the measure has, with a pencil button to edit them.

At the end of each row are the arrows, the bin and the green plus, as in every list (Part 1). A new measure is called CODE1: give it its real code and descriptions straight away. Deleting a measure deletes its figures for every product and outlet.

A measure with a calculation

A calculation makes one measure from others, using their codes. For a price where the data has value and units:

VALUE / UNITS

It is worked out separately for each outlet, period and year, from the figures of that same outlet, period and year. Use +, -, * and /, and brackets where there is more than one sign.

A red bar across the list means the measures can't be worked out as they stand. A calculation names a code that is not a measure, perhaps one you have just deleted or renamed; two measures are each worked out from the other; or two share a code. While it shows, the green tick changes nothing and the editor stays open: put the measures right, or click the red cross to give up your changes.
The Measures list, with the columns Code, Short Description, Long Description, Hide, Preset, Calculation and Format, and fourteen measures from VALUE to VOLPRICE. Each row ends with the number of formats, a pencil, arrows, a bin and a green plus
The Measures list. None of these measures is hidden or calculated, and each has one number format.

Number formats

The same figure can be shown in more than one way: sales as pounds, as thousands, as millions. Click the pencil in a measure's Format column to see its formats. Each has three parts.

PartWhat it is
NameWhat you pick it by, such as Thousands (£k).
FormatHow the number is written: a format code or a pattern, as in the table below.
ScaleWhat the figure is multiplied by before it is written. 1 leaves it alone; 0.001 turns pounds into thousands.
FormatScale1234567.8 shows asUse for
N011,234,568Whole numbers. N1 and N2 give one and two decimal places.
C01£1,234,568Money, with your own currency sign. C2 adds the pence.
£#,#.0k0.001£1,234.6kA pattern: # is a digit, the comma groups thousands, and other characters are written as they are.
£#,#.0m0.000001£1.2mThe same in millions.
+0.0%;-0.0%1A percentage with its sign: the pattern before the semicolon is for positive numbers and the one after for negative. 0.052 shows as +5.2%.

In the list of formats, the green plus above the list adds a format, and each row has its own arrows, bin and plus. The first format is the one used until you choose another.

To choose, close the editor and use View › Number Format, then the measure, then the format. Reports that show the measure in its own format follow straight away.

The number formats of one measure, opened from the pencil in its Format column: a small list with the columns Name, Format and Scale, holding one format called Default, with the format N1 and a scale of 1
The formats of one measure, opened with the pencil: a single format, N1, with a scale of 1.

Calculated measures

A calculated measure is a figure Spanner works out when it is needed, and never stores or imports: the change in sales between two years, growth, a share. Click Calculated Measures in the Document Editor.

ColumnWhat it is
CodeA small c, then capitals and digits, such as cVALUEGROU1. Spanner puts the c on and makes the rest capitals. No two can share a code.
GroupA heading, such as Change or Growth. Menus list the calculated measures under their groups.
DescriptionThe name shown for it. It can hold words Spanner fills in, such as <CHANNEL> and <TIME1>, so one description reads correctly for every planogram.
TypeWhat it is worked out for, and what the answer is. See below.
CalculationHow it is worked out.
FormatIts number formats, as for a measure.

The green plus above the list adds a calculated measure at the end. The plus on a row adds one below that row.

The four types

TypeWorked out forThe answer is
Product/NumberEach product. Nearly every calculated measure is this type.A number
Product/TextEach product.Text
Position/NumberEach position of a product on a planogram, so it can read the position's own facings and space.A number
Position/TextEach position.Text
The Calculated Measures list, with the columns Code, Group, Description, Type, Calculation and Format, and eight calculated measures in the groups Change and Growth, all of the type Product/Number. A green plus sits above the end of the list
The Calculated Measures list: change and growth in value sales, and change in weighted distribution, over each period.

Writing a calculation

Two calculated measures that most documents start with show the pattern. The first is the change in value sales. The second divides that change by last year's sales, to give growth.

CodeGroupCalculation
cVALUECHOU1ChangeVALUE_OU_1_TY - VALUE_OU_1_YA
cVALUEGROU1GrowthcVALUECHOU1 / VALUE_OU_1_YA

A calculation can read four kinds of thing.

It readsWritten as
A sales figureFour parts joined by underscores: the measure's code; OU for the planogram's outlet or CH for its channel; 1 or 2 for the period; TY for the latest year, and YA or LY for the year before. VALUE_OU_1_TY is value sales in the outlet for the latest Time 1.
Another calculated measureIts code, such as cVALUECHOU1.
A propertyIts name: a property of the product for a product type, or of the position for a position type.
A numberAs it is: 100, 0.5.

Join them with +, -, * and /.

Use brackets so that each sign joins just two things. Write (VALUE_OU_1_TY - VALUE_OU_1_YA) / VALUE_OU_1_YA, not the same without the brackets. Do not rely on multiplying being done before adding.

Because a calculation says OU and not an outlet's name, the same calculated measure serves every planogram: each reads its own outlet. The sales codes are the ones table columns use, and Reports in Depth, Part 4 sets them out in full.

Ask Spanner AI: "Add a calculated measure for unit sales growth in the outlet over Time 2, shown as a percentage with one decimal place."

Where they are used

InA measureA calculated measure
HighlightsSales highlights colour positions by one sales figure.View › Highlight › Calculated Measures, under its group.
LabelsA sales figure on each position's label.Calc. and its code.
ReportsA column for a sales figure, by its code.A column by its code, worked out on each row's total.
MovementOne measure is read as each product's movement: see Part 4.

A report column that names a measure the document does not have is simply left out, with no message. So if a colleague's report looks short of a column in your document, compare the two documents' measures here first. Next: Part 4, Movement, Substitutions and Models.

Setting documents up for a team?

If every document should start the same way, we can agree your classifications, measures and imports with you and set them up as your defaults.

Email us Book a Demo