This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi All,
I have run into a problem I cannot resolve. I have set of dates, Target and Actual numbers in a table. I need to calculate the cumulative total for each day of the month. The logic appears to be simple enough, but it doesn't work. Here is the data:
DATE TARGET ACTUAL RT_mnth st_day_mnth last_day_mnth
| 1/1/2023 | 27 | 38 | 38 | 1/1/2023 | 1/31/2023 |
| 1/2/2023 | 39 | 20 | 20 | 1/1/2023 | 1/31/2023 |
| 1/3/2023 | 26 | 37 | 37 | 1/1/2023 | 1/31/2023 |
| 1/4/2023 | 36 | 24 | 24 | 1/1/2023 | 1/31/2023 |
| 1/5/2023 | 18 | 23 | 23 | 1/1/2023 | 1/31/2023 |
| 1/6/2023 | 23 | 19 | 19 | 1/1/2023 | 1/31/2023 |
| 1/7/2023 | 14 | 23 | 23 | 1/1/2023 | 1/31/2023 |
| 1/8/2023 | 36 | 10 | 10 | 1/1/2023 | 1/31/2023 |
| 1/9/2023 | 14 | 40 | 40 | 1/1/2023 | 1/31/2023 |
| 1/10/2023 | 10 | 12 | 12 | 1/1/2023 | 1/31/2023 |
| 1/11/2023 | 36 | 25 | 25 | 1/1/2023 | 1/31/2023 |
| 1/12/2023 | 20 | 20 | 20 | 1/1/2023 | 1/31/2023 |
| 1/13/2023 | 10 | 37 | 37 | 1/1/2023 | 1/31/2023 |
| 1/14/2023 | 36 | 10 | 10 | 1/1/2023 | 1/31/2023 |
| 1/15/2023 | 40 | 29 | 29 | 1/1/2023 | 1/31/2023 |
'st_day_mnth' and 'last_day_mnth' are calculate measures from DATE. 'RT_mnth' is the cumulative total of ACTUAL column and has the following expression:
Solved! Go to Solution.
@kkanda
Use this measure:
RT_mnth =
VAR __StartDate =
EOMONTH ( MAX ( TestSh[DATE] ), -1 ) + 1
VAR __LastDate =
MAX ( TestSh[DATE] )
RETURN
CALCULATE (
SUM ( TestSh[ACTUAL] ),
TestSh[DATE] >= __StartDate,
TestSh[DATE] <= __LastDate
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you @Fowmy... it worked. I tried STARTOFMONTH function for __startDate. That has worked also.
@kkanda
Use this measure:
RT_mnth =
VAR __StartDate =
EOMONTH ( MAX ( TestSh[DATE] ), -1 ) + 1
VAR __LastDate =
MAX ( TestSh[DATE] )
RETURN
CALCULATE (
SUM ( TestSh[ACTUAL] ),
TestSh[DATE] >= __StartDate,
TestSh[DATE] <= __LastDate
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 19 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 56 | |
| 56 | |
| 42 | |
| 26 | |
| 24 |