Forum Discussion

AlexEners's avatar
AlexEners
Frequent Visitor
8 years ago
Solved

Sum add all the previous elements to a date

Hi, imagine there is a table with two column: Date and count code. (date show italian month)   This is a table result from a graph. My query have all code in a date. What i need is a table/gr...
  • anandav's avatar
    8 years ago

    AlexEners,

    You want a running total (cummulative total).

    Check the link below how to do it,

    https://whatthetechisthat.wordpress.com/2017/05/30/power-bi-cumulative-totals/

     

    If your date field in below table is a date heirarchy, then you can choose only month and year. You need to have a calendar table and establish relatship with your data table.

     

     Running Toal Measure =

          CALCULATE(

              Sum(Table[Value],

              FILTER(All(Dim_Date[Date]), Dim_Date[Date] <= MAX(Dim_Date[Date]

              )

            )