Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Fixed cumulative sum (current month)

I need to calculate an accumulated sum and use the accumulated value for the current month as a variable to add the value column for the other previous months. Example:   Mês Valor Acumulado ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI Anonymous ,

     

    Create an index column in Power Query

     

     

     

    Then create these Calculated Columns

     

    Ac = SUMX(FILTER('Table','Table'[Index] <= EARLIER('Table'[Index])),'Table'[Valor])

     

    RE = 
    var Augusto = SUMX(FILTER('Table','Table'[Mês] = "Agosto"),'Table'[Ac])
    RETURN
    Augusto + 'Table'[Ac]

     

     

     

    Regards,
    Harsh Nathani
    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)