How to make Running Total Line graph in redash?

Hi there.
That’s something you must do in your query.
For instance, in PostgreSQL this is typically done with window functions.
An example:

This adds accumulating sums to your query, besides many other possibilities. You can then plot this column in your visualizations.

1 Like

Exactly. A simple example, assuming you use Postgres and are summing a sales value:

SELECT
    date_trunc('month', date_of_sale) "month",
    sum(sales),
    sum(sales) OVER (ORDER BY date_of_sale ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
FROM sales_table
GROUP BY 1
1 Like