We are trying to plot a cumulative graph of quantities (from a table) over time, is there a way to use for loops in the graph queries ?
or any other way ?
Hi @Franck_Nussbaumer welcome to our community.
To understand more easily, you try to add a chart from a Dashboard or from Analytics view ?
Hello!
I try to create a chart on the dashboard with a custom sql query yes.
Hello @Franck_Nussbaumer,
From what I understand, the computation you want to do is more of a SQL problem.
Maybe this kind of link will help :
-
https://discourse.looker.com/t/cumulative-sum-in-mysql/807/5
You get an exemple for PostgreSQL and one for MySQL.
Once your query is ready, just follow this to display it properly:
-
https://docs.forestadmin.com/documentation/reference-guide/charts/create-a-chart#time-based
The trick is in thekey
andvalue
column names.
Hey @Franck_Nussbaumer,
Did the message from @anon79585656 fixed your issue ?
We will close this ticket if we have no reply from you soon.