Skip to main content

Using control cells to change the column displayed in a visual

How to use filters to specify which data is displayed in a visual

M
Written by Mitra Abrahams
Updated over a week ago

Control cells allow you to dynamically select and filter your data, making analysis more flexible and efficient. This guide demonstrates how to use control cells to allow users to change which metric is displayed on a visual. The approach here uses an interim SQL cell with this logic, which is then used in the final visual.

Step 1: Add a control cell

First, add a single select control cell, choose the static option and input your column headers as Options.

Option 1: Union the data

With this option, you can use a SQL cell to union the data, allowing you to add boolean_type to the filter and apply it directly within the SQL query.

Option 2: Using a case when statement

With this option, you can use a CASE WHEN statement with the filter applied, ensuring that the SQL updates automatically based on the selected filter.
​

Final output:

Canvas link with more information : https://count.co/canvas/l2IhyYC8dr1

Did this answer your question?