Skip to main content

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 over 3 weeks ago

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?