Is there a way to get a Running Total within a table?

Is there a way to get a running total within a table? You used to be able to do this by creating a Running Total Chart of any type and when viewing switching to the table view but this only gives the individual values within the periods listed since the latest update.

 

IE This is the Data I have

DateData
Jan$15
Feb$17
Mar$14
Apr$12

 

And I wish to see:

DateData Running Total
Jan$15
Feb$32
Mar$46
Apr$58

 

 

 

Thanks! 

Comments

  • I don't believe that there is a way to do this with a beastmode, but you could accomplish this inside a MySQL dataflow with something like this:

    1.png

     

     

     

     

  • Sorry, I was in a rush with my last post and just pasted an image from stack overflow.  This is how you would create the running total in a mysql dataflow:

     

    • You need to create a procedure:
      • CREATE PROCEDURE runtot()

        BEGIN

        drop TABLE if exists running_totals;
        set @runtot:=0;
        create table if not exists running_totals as
        (

        SELECT
        q1.`Date`
        ,q1.`Data`
        ,(@runtot := @runtot + q1.`Data`) as `Data Running Total`
        FROM
        (SELECT
        `Date`
        ,`Data`
        FROM original
        Group By `Date`
        ORDER by `Date`) as q1);
        END

    • You then call the procedure:
      • call runtot()
    • This will give you a table "running_totals" that looks like this:1.png

       

       

     

     

This discussion has been closed.