
- Renaming the columns in your table.
- Showing and hiding the columns in your table.
- Showing and hiding the table name from the column labels.
- Showing and hiding the totals for your columns.
- Pivoting by a column.
- Transposing your table (a.k.a. pivoting your metrics)
- Locking a column from scrolling in your table.
- Adding conditional formatting to your cells.
Columns, rows, and metrics
Table visualizations have three components:- Rows: When a field is chosen for the row area, all of the unique values for that field are populated as values in the rows of your table.
- Columns: When a field is chosen for the column area, all of the unique values for that field are populated as values in the columns of your table.
- Metrics: If you have metrics in your table, then each metric cell shows the summarized information for a given row + column combination.

Adding tiny bars to table visualization
You can also enable tiny bars on each table cell, to improve visual feedback. To configure this, go tobar display on the sidebar, and select the numeric columns. We’ll calculate the min/max values , and we will display a tiny bar next to the value on the table

Pivot tables
Pivot tables allow you to summarize larger sets of data in table visualizations by moving row values into columns. They’re also helpful to identify trends between two dimensions in your data using a table visualization. To add a pivot in your table, move a dimension to thecolumn section of your table configuration. This will change the dimension from having its values populate the rows values of your table, to having it populate the column values of your table.

Transposing your table
You can transpose your table so that your metrics become rows in your table instead of columns. This can be helpful if you want to compare a lot of metrics to each other (e.g. how my metrics are changing over time). To move your metrics to rows in your table, you need to have at least 1 dimension as a column (i.e. at least one pivot) then, you can click onshow metrics as rows in the table configuration.

Totals
You can add column totals or row totals (in pivot tables) to your tables by selectingShow column totals or Show row totals in the chart configuration panel. The column totals in your results and table visualizations are calculated using the underlying data from your table, not only the values that are visible in the table.
Totals are not calculated for table calculations. Also, in pivot tables, totals are only shown for
count and sum metric types.Incorrect totals
Why are my totals lower? When using thecount_distinct metric type, you can sometimes get totals that are smaller than if you sum up the values seen in the table.
For example, if you count the distinct number of devices that viewed pages on our website each month, it would look something like this:

Anonymous device count column, the value you get is much higher than the total shown in the table. This is because the same device can view pages on our website across many months. So, when you add up the values in the table, you’ll be counting some devices more than once.
Lightdash uses a SQL query to calculate the distinct number of devices across all of the months so we avoid double-counting devices.
Why are my totals higher?
There are two reasons why this could be happening:
- You’ve set a row limit in your query that’s truncating the results. If the number of possible results from your query is larger than the row limit you’ve set, Lightdash will calculate the totals using all of the results (including the rows that have been removed from your table because of the limit).
- You’re using metric or table calculation filters. When you use metric or table calculation filters, the totals are calculated before the filters are applied.
This calculation isn’t a “true” total when you’re using metrics types that are
count_distinct!Subtotals
You can add subtotals to your tables by selectingShow subtotals in the chart configuration panel.

Freeze columns
If you have a wide table, you may want some columns to be locked to the left while you’re scrolling. Click on the lock icon beside the column(s) you want to keep pinned to the left of your table visualization to lock them in place.
Conditional formatting
Sometimes it’s helpful to highlight certain values in your tables when they meet a specific condition. You can set up conditional formatting rules by going to the Configure tab, then Conditional Formatting.
Highlighting cells
When you add a new rule, you’ll first need to pick which column should be highlighted and the type of rule you’d like to apply (Single or Range). There are three ways to compare data for each role:- Values compares the chosen field to manual input values.
- For example, color the
Profitcolumn red when a row is less than $10,000
- Field compares the chosen field to another field in your results.
- For example, color the
Revenuecolumn green when it is greater than theTarget revenuecolumn.
- Field values compares another field in your results to manual input values, then formats your chosen field.
- For example, color the
Partner namecolumn orange when theTotal orderscolumn is greater than 1,000.
Color ranges
To use color ranges for your rules, select Range under Conditional Formatting. You can choose specific minimum and maximum values, or you can automatically set them based on the values in your results.