Forum Discussion
SQL query or Dax for Break down running total (cumulative)
- 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
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
- SpiroswayGR4 years ago
Resolver III
Great solution!! Thanks!!
serpiva64 Your solution is worked too, but generally I prefer variable solutions. Thanks again for your time!
- SpiroswayGR4 years ago
Resolver III
How can we modify the function if we want to do the same exercise for data that have double dates and extra column country?
For example
Variable solution not working well here.
serpiva64 but need revision on 1st day for 2nd country
semi working with country
- serpiva644 years ago
Solution Sage
Hi,
Before adding index you have to group by
then you add the index
- expand
- add a custom
- then extract values
and apply the necessary steps to get your goal