Forum Discussion
Cumulative Total
- 10 years ago
ElliotP Sorry about the original post. It was from my phone and had typos :smileywink:
Okay here is the formula for Running Total as a Calculated Column (prorerly formatted)
Running Total COLUMN = CALCULATE ( SUM ( 'All Web Site Data (2)'[UniquePageviews] ), ALL ( 'All Web Site Data (2)' ), 'All Web Site Data (2)'[Date] <= EARLIER ( 'All Web Site Data (2)'[Date] ) )And as you can see it works! :smileyhappy:
And here's the MEASURE formula
Running Total MEASURE = CALCULATE ( SUM ( 'All Web Site Data (2)'[UniquePageviews] ), FILTER ( ALL ( 'All Web Site Data (2)' ), 'All Web Site Data (2)'[Date] <= MAX ( 'All Web Site Data (2)'[Date] ) ) )Which also works...
CUMULATIVE SUM, date sensitive, solved at least for me:
BEWARE, all solutions provided before do not work if the dataset goes more in the past compared to the starting date you want to see in the Cumulative sum. Meaning, the solutions provided so far do not work if i want a Cumulative sum for Year-to-date 2022, if i have data for 2021, 2020... And i want the cumulative sum to adjust based on the year.
HERE A SOLUTION THAT WORKED FOR ME:
See the outcome pics below, it works even when changing year, only starting the Cumulative Sum from the beginning of the selected year!
The measure is essentially a conditional calculation between the first day of the selected year and the last day of the current period (e.g. month):
The IF function is only there to make sure i see blank cells in the months Year-to-go.
The LastDate measure is calculated as:
Hello!
Something similar happens to me, I am looking for a function that shows me the accumulated per month for 2023 taking into account the values of 2020, 2021 and 2022, as follows:
But I do not manage to make January start with the accumulated values of previous years and that from there it accumulates
Will you know how?
By the way, I found the function of "IF([]),<>0, "") very useful. Thank you!!