Forum Discussion

SpiroswayGR's avatar
SpiroswayGR
Resolver III
4 years ago
Solved

SQL query or Dax for Break down running total (cumulative)

Dear community members,   I am trying to create a field or measure that will break down the running total field. For example :  01/02/2022 : Revenue total = 100 02/02/2022 : Revenue total = 300 ...
  • amitchandak's avatar
    4 years ago

    SpiroswayGR , a new column

    todays revenue =

    var _max = maxx(filter(Table, [Date] < earlier([Date]) ), [Date])

    var _rev = maxx(filter(Table, [Date] =_max ), [revenue]) 

    return

    [revenue] -_rev