Skip to content
Learn › Transform and pipeline: open the docs menu

Column types and subtypes

Every column is stored as Text, Number or Date. A Number or Text column can also carry a meaning on top of that: it is an ID, a currency amount or a percentage. Mammoth calls this the column's subtype, and treats it as part of the column's type.

A subtype never changes the stored values or what a saved task calculates. It changes the tag in the column header, which number format controls you can change, and the warnings and defaults you see when you aggregate.

The column types

TypeStored asHeader tagWhat it means
TextTextAaFree text or labels.
IDTextkey iconA value that identifies a row, like a customer or order ID. Kept as text, so leading zeros stay.
NumberNumber123Numeric values you can calculate with.
IDNumberkey iconA number that identifies a row. Isn't summed or averaged by default.
CurrencyNumber$ iconAn amount of money.
PercentageNumber% iconA share or rate.
DateDatecalendar iconA calendar date or timestamp.

Date columns have no subtypes.

Read the type tag in the header

Each column header in the data grid starts with a small grey tag that shows the column's type. Hover the tag for its meaning, for example "ID (Number). A number that identifies a row, like a customer or order ID. Isn't summed or averaged."

The tag is a label only. To change the type, use one of the places below.

How Mammoth detects a subtype

When data is loaded, Mammoth looks for IDs, currency amounts and percentages. It sets a subtype only when it is confident, and only one that fits the column's storage type. In the type menu, the entry Mammoth chose is marked detected.

A type you choose always wins over a detected one. Choosing Number or Text for a column marks it as plain, and detection doesn't change it back.

Change a column's type

The type menu is the same everywhere. Its first level is Number, Text and Date. Number opens Number, ID, Percentage and Currency. Text opens Text and ID. Date is a single option. While you have a change pending, the menu head shows Reset to put back the type the column had.

WhereWhat the change affects
Column Manager in the data editor (click the column count in the bottom bar, then Column Manager)Choose This view only to change just this View, or apply it to the whole dataset ("Modifies the dataset schema for all views.").
Column Manager in the dataset's settingsThe dataset, so every View sees the new type.
Convert Column Type taskThis View, from that task onward. Picking another entry under the column's own type (for example Percentage for a Number column) changes only the meaning, not the values. See Convert Column Type.
Add Column taskThe new column gets the type you pick.

If a subtype can't be saved, you see "Couldn't change what this column means".

Number formats set by the type

A Currency, Percentage or ID column decides some of its number format. In the column menu's Formatting section, those buttons are greyed out and the note "Set by the column's type" appears below them.

TypeControls you can't change in the column menu
CurrencyPercentage. If the type was set for the whole dataset, the currency symbol too.
PercentageCurrency. If the type was set for the whole dataset, the percentage button too.
ID (Number)Thousands separator, so codes show as typed.
Number, set as plain for the whole datasetCurrency and percentage.

A type that Mammoth only detected greys out less. A detected Currency greys out only the percentage button, a detected Percentage only the currency picker, and a detected ID nothing. Decimal places are always yours to change. See Format a NUMERIC column.

Aggregation warnings

Summing or averaging an ID adds up codes, and summing percentages rarely means anything. Mammoth warns you where you pick an aggregation:

WhereID column with Sum or AveragePercentage column with Sum
Explore card Show values by"Adding or averaging it adds up the codes. Did you mean Count distinct?""Adding percentages rarely means anything. Did you mean Average?"
Group & Pivot taskSame text, with Swap to Count distinct and KeepSame text, with Swap to Average and Keep
Create Metric from a column header"Sum adds up the codes." or "Average of the codes is not a quantity.""Adding percentages rarely means anything. Average usually does."

Each warning starts with the column name, for example "order_id is an ID." The warnings don't block you. In Group & Pivot, Keep dismisses the warning for that aggregation and keeps your choice.

When you pick a column for Sum or Average in an Explore card, ID columns are listed last with the hint "it's an ID".

Report an issue · support@mammoth.io