Format numbers and dates, and rename or sort columns
Renaming, formatting and sorting columns are Display Changes: they change how a View looks, never the data, and they add no pipeline task. You make them from a column's 3-dot menu in the data grid, and review or undo them in Display Changes (n) at the bottom of the Pipeline panel (Hide, freeze and undo display changes). Text formatting (case and whitespace) is the exception: it adds a Text Formatting task.
Rename a column
There is no Rename Column function in the Transform menu. Rename from the grid instead:
- Double-click the column header, or open its 3-dot menu and choose Rename Column.
- Type the new name in the inline box and press Enter.
The new name applies at once, in this View only, and shows in the grid, pipeline task dropdowns and exports. Other Views still use the original name. Renaming here and in the Column browser is the same thing: both set a display name for this View. To undo it, choose Revert to original column name in the column menu (shown only after a rename).
Rename Column is disabled while the transformation info panel is open or while any pipeline task is in error. Hide Column and Revert to original column name are also disabled while a task is in error.
Format a number column as currency, percent or decimals
On a NUMERIC column, the formatter sits inline in the column menu under Formatting, as a row of icon buttons with no text labels.
| Control | What it does |
|---|---|
| Separator | Turns thousand separators on or off (1,234,567 or 1234567). On by default. |
| Percentage | Shows numbers as percentages (0.45 shows as 45%). |
| Currency | Opens a picker: $ (USD), € (EUR), ¥ (YEN), £ (GBP) or ₹ (INR). |
| Decimal precision | Left and right chevrons step the visible decimal places, up to 5. The default is 2. |
| Apply | Saves the format. Enabled only when the settings differ from the saved format. |
| Reset | Puts back the defaults: separator on, no currency, no percentage, 2 decimals. Shown only when the format differs from the default (tooltip "Reset to original formatting"). |
Currency and percentage can't be used together: turning one on turns the other off.
On a Currency, Percentage or ID column, some buttons are greyed out with the note "Set by the column's type". For example, a Currency column can't show as a percentage, and an ID column has no thousands separator. Apply leaves those settings alone, and Reset brings back what the type decides. To change them, change the column's type. See Column types, IDs, currency and percentages.
Change how a date column is displayed
- Open the date column's 3-dot menu and hover or click Format.
- Choose a date type: Universal, US or UK.
- A list of formats appears, each showing today's date as a live preview. Click one to apply it at once.
To turn text into real dates, use Convert Column Type instead. See Convert text to dates and numbers.
Change text case or trim spaces from the column menu
On a TEXT column, Format opens a flyout. Unlike number and date formatting, this adds a Text Formatting task and changes the column's values for everyone using this View.
- Tick Change case to and pick UPPER, lower or Capitalized, or tick Normalize whitespace to remove extra spaces and tabs.
- Click Apply. It stays disabled until you tick at least one option. More options opens the full Text Formatting panel with your choices filled in. See Work with text and JSON.
Show Whitespaces, a checkbox in the main column menu (not the Format flyout) on TEXT columns, shows spaces and special characters as visible symbols. Use it when leading spaces or tabs are spoiling a match.
Sort rows by one or more columns
To sort by one column, choose Ascending or Descending in the Sort dropdown of its 3-dot menu. The grid reorders at once. The column menu sorts by one column at a time; a sort on another column replaces it. To sort by several columns, click Sort by in the grid footer. It shows the active sort (or "Default") and opens the Sort Columns dialog, where Add another sort adds a level. An X beside Sort by clears the sort without opening Display Changes.
Sorting is a Display Change, not a pipeline task. It is saved with the View, stays after a refresh, and is listed under Grid Changes in Display Changes. There is no Sort pipeline task. If a calculation needs a row order, use Add Sort inside functions such as Fill Missing Values or Window Function; that order is saved with the task.
Troubleshooting rename, format and sort
| Symptom | Cause | Fix |
|---|---|---|
| A sort disappeared after a refresh | It should persist as a Display Change | Check Grid Changes in Display Changes |
| Rename Column is greyed out | The transformation info panel is open, or a task is in error | Close the panel, or fix or remove the failing task |
| Format or sort changes are ignored | A pipeline task is in error | Fix or remove the failing task, then try again |
| Number format didn't change | Apply wasn't clicked | Reopen the menu and click Apply |
| Currency and percentage won't both stay on | They can't be used together | Pick one |
| A number format button is greyed out with "Set by the column's type" | The column is a Currency, Percentage or ID column | Change the column's type |
Related
- Hide, freeze and undo display changes: the other Display Changes and how to revert them.
- Use the column menu: every column menu action.
- Column types, IDs, currency and percentages: why some format buttons are locked.
- Download data: how hidden columns and new names reach an export.
Something wrong? support@mammoth.io