Forum Discussion

wiktorius1984's avatar
wiktorius1984
Regular Visitor
6 years ago
Solved

Add Sum all the previous elements to a date

  Hello, I would like the sum of hours for a month with previous months.  my table looks like this                   I would like to get something like this             ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    wiktorius1984 

    _hours = CALCULATE(SUM('Table'[h]),ALLEXCEPT('Table','Table'[Month]))
    
    Comm_Hours = CALCULATE(SUM('Table'[h]),FILTER(ALL('Table'[Month]),'Table'[Month]<=MAX('Table'[Month])))