Cumulated sum in a quarter using Magic ETL

Hello,

can you help me to calculate a cumulated sum in a quarter using Magic ETL ?

In this exemple:

DateProductState Profit 
15-jan-2018BicycleOregon $     100,00
16-feb-2018BicycleOhio $     100,00
30-mars-2018CarOregon $  2 500,00
10-april-2018BicycleOregon $     100,00
01-mai-2018CarOhio $  2 500,00
17-mai-2018CarMontana $  2 500,00

 

the cumulated profit of 1Q would be $ 2 700 and for 2Q is $ 5 100.

 

I would like to use Magic ETL because we do not use MySQL in our project and the Beast Mode can't do it itself as I'am calculting with multiple rows in my data set.

 

Thank you very much in advance for your help.

Katerina

Best Answer

  • Valiant
    Valiant 🔵
    Accepted Answer

    Ok, so I think I understanding what you're wanting. I took the original sample you gave and built the following just using a 'Running Total Line' card type (no ETL needed)

    image.pngThe only optional changes I made were to set the date range fitler to Graph by None

    image.png

    I set the 'Number of Running Total Series' to 1

    image.png

    And then I added the Product and State columns as quick filters

    image.png

     

    Now the quick filters will allow you select or remove certain variables and have your running total line update accordingly. 

     

    Let me know if you have any other questions,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

Answers

  • In the ETL process, you can use 2 'Date Operations' widgets, one to return the Quarter of Date and the other Year of Date. I would then use the Combine Columns option to combine those values into one new column.

     

    From there  you can do a 'Group By' on the new date from  your Combine and sum the Profit amount.

     

    That should leave you with a Quarter Date column and a Quarter Profit column. If you need additional levels of detail you can add columns to your Group By.

     

    Hopefully this helps get you started.

     

    Sincerely,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

  • Hello,

    thank you very much but I had to expresse my need wrongly. Actully I need to follow my cumulated profit within a quarter (because I have an objectif by quarter) but I need to observe its evolution by day or by a week. In my exemple, the result I'm looking for would look like :

     

    cumulated profit.PNG

     

    Also I need to be able to filter my indicater by other colomnes (in my exemple by State and Product). Your solution would give me one value for whole the quarter.

     

    Thank you once more for your help.

    Katerina

     

     

  • YES, that is exactly what I need ! Thank you very very much !