Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Running total

I am trying to get a calculate a running total per vendor. I am wanting to have each month sum all the previous months.  For example, a date range from Jan 2018 - Aug 2018. I want to know for a spec...
  • v-danhe-msft's avatar
    8 years ago

    Hi Anonymous,

    Based on my test, you could refer to below formula:

    running total measure = CALCULATE(SUM(Table1[Sales]),
                                               FILTER(ALL(Table1),
                                                   'Table1'[Date] <= MAX('Table1'[Date])
                                                   &&
                                                       YEAR('Table1'[Date]) = YEAR(MAX('Table1'[Date]))))

    Result:

    You could download the pbix file to have a view, if the problem still occurs, could you please offer me some sample data to test?

    https://www.dropbox.com/s/yitavv5yxuxt418/Running%20total.pbix?dl=0

     

    Regards,

    Daniel He