I have set up the analytics function to display the number of outgoing orders per week going forward, it works great except for when there are no orders in a given week, e.g. 36, the graph skips on the X-axis from 34, 35, 37, 38 which makes it confusing. Is there a way to display dates/weeks containing zero-values?
g
George McMullen
09/06/2021, 8:56 AM
You’ll only get data where data exists, unfortunately. In order to do what you’re looking to do, you’d have to include some other kind of data that would always exist and then set it to 0 using a CASE statement. But this can slow down your query if you start to include everything. For example:
Copy code
CASE
WHEN {type} = "Outgoing Order"
THEN {amount}
ELSE 0
END
That’s just pseudo code BTW.
a
Axel
09/06/2021, 11:09 AM
Thanks, got it working now. Doesn't seem to add too much time when loading the data either