Forum Discussion
Cumulate values between two date fields
- 5 years ago
Hi, Anonymous
Please check the below picture and the sample pbix file's link down below.
Power Measure =IF (ISFILTERED ( Dates ),CALCULATE (SUMX (Plants,Plants[Power]),FILTER (Plants,Plants[StartDate]<= MAX ( Dates[Date] )&& OR (Plants[EndDate]>= MIN ( Dates[Date] ),Plants[EndDate]= BLANK ()))))
Hi, Anonymous
Please check the below picture and the sample pbix file's link down below.
Hi Jihwan_Kim
Thank you for helping me, the measure you propose works fine until 2021 but the following years are not displayed in the visual. Do you know where could the problem come from ?
In the database there are a lot of rows with StartDate in 2022 2023 2024 2025 but nothing on the visual.
I already tried the "Show items with no data" option and still nothing after 2021.
I also check the external filters and nothing should be disturbing the measure.
- Jihwan_Kim5 years agoSuper User
Hi, Anonymous
Thanks for your feedback.
Please share your sample pbix file's link here, then I can try to look into it to come up with a solution.
- Anonymous5 years agoNot applicable
Sorry the problem came from my calendar table (parenthesis misplaced in the CALENDAR formula) so the last date was in 2021 instead of 2025 😅
Thank you again for the measure and have a nice day !
Best regards,
Cado