2. Filters and control cells

Control cells can be used to filter the results you show. The types of control cells available in Count range from field selectors, text/number inputs and date selectors.

When using control cells for reporting, there are 2 key points to note:

  • Setting up your control cells

  • Optimising canvas performance by making use of local cells

Set up your control cells

Control cells can be referenced from SQL queries, or linked directly into visuals/low code cells.

Reference from SQL queries

When selecting a control cell, the code snippet required to reference it is shown in the right-hand sidebar. Copy this snippet into your SQL code to reference the control.

Control cells can be referenced from filters in visual or low-code cells - select a filter, then select Connect to control. Count will generate the required SQL to reference the control cell automatically.

Insert our control cell template into your canvas for some further examples.

How to optimise your canvas performance with control cells

To make sure your report loads quickly you'll want to make use of local cells, caching and scheduling.

As discussed in an earlier guide, local cells and caching are crucial when understanding how to increase the performance of your canvas. This is even more important when it comes to reports, as they tend to be read more widely.

Local cells, caching and scheduling with control cells

When using these features with respect to reporting, you want to consider when and where in your data modelling you switch to using local cells.

If you have control cells, you want everything from this point onwards to be local. This means you're not querying your database every time a filter is changed, resulting in much faster updates.

Control cell FAQs

What kind of control cells are available

Read about the full range of control cells here.

When I change a control cell, how do I make sure my results are updated?

Count canvases are reactive, meaning the results will update automatically when you update a control cell.

If automatic cell execution has been disabled for the canvas or any downstream cells, then you'll need to manually re-execute those cells if they depend on the control cell that was changed.

Last updated