--- title: "How do I format results the way the web UI does?" slug: "how-do-i-format-results-the-way-the-web-ui-does" tags: ["LumiCode"] status: "new" updated: 2026-11-20T14:43:24Z published: 2026-11-20T14:43:24Z canonical: "support.lusid.com/how-do-i-format-results-the-way-the-web-ui-does" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # How do I format results the way the web UI does? LumiCode shows your results the way the web Query Editor does. A Saved Query opens with the number formats, colours, filters and totals it was saved with. You can also add your own to any result, then save them with the query so they look the same for everyone, in LumiCode and in the web UI. ## Prerequisites - LumiCode installed and signed in. See [How do I install LumiCode?](/v1/docs/how-do-i-install-lumicode) - A query that has just run, or past results loaded with `/results`. - To save formatting with a query, permission to write to the workspace it's saved in. ## Which method to use Every method works in both `/rows` and `/group`. Press the key while the grid is open. Press `?` at any time for the full list of keys on the current screen. | You want to | Press | | --- | --- | | Change how a column's values look, or rename it | `e` | | Colour cells or rows that meet a condition | `r` | | Show only the rows you're interested in | `f` | | Add totals under the result | `t` | | Hide columns | `c` | ## Methods ### Method 1: Open a Saved Query with its formatting Run a Saved Query from `/run` or `/queries`. LumiCode shows its result as it was saved in the web UI, with: - Its number and date formats, renamed and hidden columns, and column order. - Its conditional formatting and column colours. - Its saved filters. The line under the result describes them in words and says how many rows they leave. - Its footer totals, worked out over every row the filters leave. `/rows` shows the result the same way. `/group` opens straight on the grouping it was saved with, and tells you about anything it couldn't keep. In `/rows` or `/group`: - Press `⇧f` to turn the saved filters off, and again to turn them back on. - If you have changed the formatting, press `⇧r` to go back to the Saved Query's own formatting. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-0F0F81LN.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=JQdnyqdelsaNXRZ5hnNo5tC2ow6jo1khYYZJKtpusLs%3D) ### Method 2: Format or rename a column 1. Type `/rows` and press Enter. 2. Move the column cursor (`▸` in a heading) to the column with the Left and Right arrows. 3. Press `e`. LumiCode opens the column's formatting. 4. Move between the settings with Up and Down, and change one with Left and Right. 5. Press Enter to apply your changes, or Esc to leave the column as it was. The settings on offer depend on the column's type: | Setting | Columns | What it does | | --- | --- | --- | | Name | All | The heading the column is shown under. | | **decimals** | Numbers | How many decimal places to show. | | **thousands** | Numbers | Whether to separate thousands, for example `1,234,567`. | | **percentage** | Numbers | Whether to show the value as a percentage. | | **negatives** | Numbers | How to show negative numbers: with a minus sign, in red, in brackets, or in red brackets. | | **date** | Dates | The date format. | | **colour** | All | A colour band for the column's heading and cells, as the web UI's Style/Colour swatches give it. | | **wrap** | All | Whether long values wrap over several lines. | | **reset** | All | Takes all of the column's formatting off. | A setting shows **as it is** until you choose something for it. To format a column that's hidden or off screen, press `c` to open the column picker, move to the column and press `e`. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-Z1K8KQBS.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=34V71oFaxbKr6tCPYquiXF6rsaA5TByosJ0lZxvwa4o%3D) ### Method 3: Add conditional formatting Conditional formatting changes how a cell or a whole row looks when its value meets a condition, for example colouring negative values red. 1. In `/rows` or `/group`, move the column cursor to the column and press `r`. LumiCode lists the column's rules. 2. Press `a` to add a rule, or press Enter on a rule to change it. 3. Fill in the rule: - **test**: the column whose value is tested. This can be another column in the same row, so one column can be coloured by another. - The condition, for example equal to, contains, greater than, in range or is blank, and the value to compare with. You can compare with a typed value or with another column in the row. - The effect: a text colour, a fill, text before or after the value, an Excel number format, or a text colour or fill for the whole row. - **group rows**: whether the rule also applies to group and total rows, against their figures. 4. Press Enter to apply the rule. If something is wrong with it, LumiCode tells you first. When a value meets more than one rule, the first rule in the list wins. Press `[` and `]` to move a rule up or down. Press `x` to take one away. | Choosing a colour | How | | --- | --- | | Pick from swatches | On a custom colour, press `space`. The swatches include the theme's colours, the colours already in the query and your recent ones. LumiCode warns you if a colour would be hard to read. | | Type or paste a hex code | In the swatches, press `#`. | A custom Excel format starts on an example that suits the column, with a guide to writing one. LumiCode shows one of the column's values through the format as you type. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-C694JCRZ.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=f3cVqL38Ycbemyi86sU8VXaM5bC%2FwCMK3tgyUSW3Qio%3D) ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-Q8HLXRV8.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=cIlJINeiW8RUKAoupWq49IURQGQ0s38rPOSdATkejHw%3D) ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-LEORXYOS.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=OkK9gbzHlal%2BpuuMwBudQHz0vSSRQMZyUjetuLkFKfs%3D) ### Method 4: Filter the rows 1. In `/rows` or `/group`, press `f`. LumiCode lists the filters on the rows. 2. Press `a` to add a filter and choose its column, or press Enter on a filter to change it. 3. Choose the comparison and the value. To add a second comparison, use **then** to join it with **and** or **or**. A filter can have two comparisons, as in the web UI. 4. Press Enter to apply it. Filters apply straight away. The status line describes what they keep, for example `filtered to Driver contains '%FX'`. Press `x` on a filter to take it away, or `⇧f` to turn all the filters off and on. Two kinds of filter Filters you write with `f` are the web UI's kind, and are saved with the query. The SQL filter you type after `/` belongs to LumiCode only, and isn't saved. ### Method 5: Add totals 1. In `/rows` or `/group`, press `t`. 2. Move between the columns with Up and Down. For each one, use Left and Right to choose its total, such as a sum, average or count, or none. 3. In `/group`, press `space` to choose where each figure is shown: on the group rows, in the total under them, or both. 4. Press Enter to apply. The server works out the totals over every row the filters leave, so they're exact however large the result. If a total's column isn't on screen, because it's hidden, scrolled off or a grouped level, LumiCode gives the total in the legend instead. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-AO0S2F9X.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=yx4s%2FzKsTAE%2B%2BYuCuwRh9360lOoxz3G%2FlvMg%2Ff%2FQTqw%3D) ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-D3UOSSMT.png?sv=2026-02-06&spr=https&st=2026-11-20T21%3A21%3A09Z&se=2026-11-20T22%3A21%3A09Z&sr=b&sp=r&sig=YTI4dp2RVS9soaATAq6s0%2Fc1XlYjp39kvhASfkPZ7fc%3D) ### Method 6: Save the formatting with the query Formatting, grouping, sorting, filters, totals and hidden columns all stay with the result for as long as it's your last one. To keep them for next time, save them with the query: 1. Type `/save` and choose **LUSID Saved Queries**. You can also save from `/recent`. 2. Choose the workspace, then enter a group, a name and a description. A query you opened from Workspaces is saved back where it came from by default: press Enter through the questions, and answer yes to the overwrite. 3. LumiCode lists the formatting, grouping and filters it will save, then asks **save its formatting, grouping and filters with it, as above?** Answer yes. The next time anyone opens the query, in LumiCode or the web UI, its result looks the way you left it. A few things LumiCode can do aren't kept by the web UI, such as a median, a column grouped twice, or groups ordered by `#`. LumiCode warns you when you choose one, and again when you save. ## Troubleshooting ### My Saved Query lost its formatting after I edited it When you edit a Saved Query's SQL before running it, LumiCode runs it without its formatting, because the formatting was written for the saved SQL. To get the formatting back, load the query again from `/run` or `/queries`. ### The colours are missing from my saved transcript Markdown can't hold colours. `/transcript` in Markdown keeps the formatted values and totals. To keep the colours and fills as well, use `/transcript html`. ## Related articles - [How do I explore, group and chart results?](/v1/docs/how-do-i-explore-group-and-chart-results) - [How do I save queries and results?](/v1/docs/how-do-i-save-queries-and-results) - [How do I run several queries together as a multi-query?](/v1/docs/how-do-i-run-several-queries-together-as-a-multi-query)