I just upgraded my Metabase to version 0.50.1 and found that my question, which was visualized correctly in version 0.48.13, is not properly visualized after the upgrade
the data was created from a custom column of sales order for each year :
case([Date SO] >= "2021-01-01" AND [Date SO] <= "2021-12-31", [SOprice], 0)
This produces only cumulative data for each year. Then, I summarized the cumulative sum of each year's sales by "month of year."
I think this is a bug that arises in the "month of year" summarizing. Even though the months are the same (JAN-DEC), they are plotted in the timeline 2021, 2022, 2023, 2024 instead of overlaying into the same JAN-DEC as in version 0.48.13.
However I try to test if summarize Sum of "Sales Order" by month of year the result is still look good.
Hi Roberto
For the cumulative sum still not properly visualized by month of a year. This is the main problem which need solution and the reason why I made this report.
Thank you
Taufik
I am using the "Sample Database" provided by Metabase,
with the following query:
SELECT
CREATED_YEAR,
CREATED_MONTH,
SUM(QUANTITY) AS monthly_sum,
SUM(SUM(QUANTITY)) OVER (
PARTITION BY CREATED_YEAR
ORDER BY CREATED_MONTH
ROWS UNBOUNDED PRECEDING
) AS yearly_cumulative_sum
FROM
(
SELECT
EXTRACT(YEAR FROM CREATED_AT) AS CREATED_YEAR,
EXTRACT(MONTH FROM CREATED_AT) AS CREATED_MONTH,
QUANTITY
FROM
PUBLIC.ORDERS
) AS source
GROUP BY
CREATED_YEAR,
CREATED_MONTH
ORDER BY
CREATED_YEAR,
CREATED_MONTH
Is the output similar of what your aiming to achive?
Thank you Roberto for your native SQL solution. Yes it show the curve like i want to make. however what I think need to be concern by the Metabase team is in this version, month of year is not working properly in the Editor like in the previous version .
I try to simulate the each year sales with Sample Database, and after several trial and error got the way to produce the same comparison curve with 0.50.1 version is by staging the summarize into two steps like this :
Even though for this case the problem is solved, however I expect Metabase team still need to find why the Month of year still considers the year when work with cumulative sum , which make not possible to produce the correct curve with one stage of summarize.