Forum Discussion
Accumulated by adding value from previous years
Hello everyone, everything good?
I have a table where I need to perform a sum of information from the previous year with the current year to generate a kind of accumulated to perform a rate calculation.
The table I have is the one in the following example:
And the calculation I need to perform would be something that would generate a table as a result in the following sense:
Add the information for 2017 + 2018 to the 2018 result,
for 2019, it would be the sum of 2017 + 2018 + 2019
And so on.
Could you help me with the formula?
Hi, ErickReiis
You can try the following methods.
Measure = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALL ( 'Table' ), [Type] = SELECTEDVALUE ( 'Table'[Type] ) && [Year] <= SELECTEDVALUE ( 'Table'[Year] ) ) )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- miTutorials
Super User
Please check this below tutorial..
- v-zhangti
Community Support
Hi, ErickReiis
You can try the following methods.
Measure = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALL ( 'Table' ), [Type] = SELECTEDVALUE ( 'Table'[Type] ) && [Year] <= SELECTEDVALUE ( 'Table'[Year] ) ) )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.