Forum Discussion
Commonq1234
2 years agoFrequent Visitor
Cumulative sum two dates condition
Hi all, I am trying to add cumulative sum based on two different dates. I have example data like below: Value Ready Date Implement Date 1 Dec 2023 Dec 2023 3 Dec 2023 Dec 2023 ...
- 2 years ago
It works now I figured it out by linking the two dates column to a new date table. Then I use USERELATIONSHIP as filter and pass into the filter. Thank you for your help regardless.
Jihwan_Kim
Super User
2 years agoHi,
I am not sure if I understood your question correctly, or I do not know how your semantic model looks like, but please check the below picture and the attached pbix file.
expected result measure 1: =
CALCULATE ( SUM ( data[Value] ), REMOVEFILTERS ( 'Calendar' ) )
expected result measure 2: =
CALCULATE ( SUM ( data[Value] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) )
Commonq1234
2 years agoFrequent Visitor
Hi, thanks for the response.
I think not quite, I may have provided the ready date as the same; however, as I need each date column to act as the condition. For example data below:
| alue | Ready Date | Implement Date |
| 1 | Dec 2023 | Dec 2023 |
| 3 | Dec 2023 | Dec 2023 |
| 5 | Dec 2024 | Dec 2024 |
| 7 | Dec 2024 | Dec 2025 |
Expected result should be
Is there a way to cumulative each sum based on the date column it's corresponded to? Thanks
| Year | Cumulative Ready | Cumulative Implement |
| 2023 | 4 | 4 |
| 2024 | 16 | 9 |
| 2025 | 16 | 16 |