Skip to main content
All CollectionsQuerying Data
Create dynamic chart aggregations with control cells
Create dynamic chart aggregations with control cells

Use control cells to determine the date aggregation of your x or y axis.

Harriet McCay avatar
Written by Harriet McCay
Updated this week

You can create dynamic chart aggregations using either regular & jinjia referencing.

(1) Using control cells with regular SQL

Use a case statement to set the date aggregations & axis title.

The full example:

(2)Using control cells with jinja references

Use jinja referencing to set the date aggregations. Learn more about jinja templating here. To see what SQL will be generated, select "Show compiled SQL" from the LHS design bar.

The full example:

---

See the full example in a canvas here.

Did this answer your question?