Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate running total based on Sort Column

I have a table where I am trying to calculate a running total based on a sort column with an additional filter as follows. This would have typically been a standard YTD formula but the start of the fiscal year is in June and not calendar based hence the Month Sort.

 

 

Any thoughts on how best to build  formula to do that?

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous 

     

    Use and modify the below Formula as per your need.

     

    Running Total COLUMN =
    CALCULATE (
        SUM ( 'table'[col1] ),
        ALL( 'table'),   //ALLEXCEPT ( 'table', 'table'[] ) //If you want to group by any column
        'table'[col2] <= EARLIER ( 'table'[col2] )
    )

    https://www.wallstreetmojo.com/power-bi-running-total/

     

    Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!

     

    Regards,
    Pranit

     

11 Replies