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 moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Dear all,
we are struggling for finding the best method to apply cumulative sum from two different categories and putting into the same table and plot.
As Main source, here is the table:
the table is split into two different category: 2025 and 2024.
The desired answer is:
Column Day has been created using this DAX in the Calendar table:
| date | Score |
| 01-01-2025 | 5 |
| 01-01-2025 | 8 |
| 02-01-2025 | 4 |
| 03-01-2025 | 3 |
| 04-01-2025 | 5 |
| 04-01-2025 | 6 |
| 05-01-2025 | 4 |
| 02-01-2024 | 4 |
| 02-01-2024 | 8 |
| 02-01-2024 | 1 |
| 03-01-2024 | 1 |
| 04-01-2024 | 8 |
| 05-01-2024 | 3 |
Best regards,
Cornelis
Solved! Go to Solution.
@CornelisV Find steps below:
Created a table using your data:
for year 2024 cumulative sum will start as 13 not 19 as 8+1+4 = 13
1. Create new column as a Year and Day.
2. Create cummulative Column with below dax code:
let me know if this helps
@CornelisV Find steps below:
Created a table using your data:
for year 2024 cumulative sum will start as 13 not 19 as 8+1+4 = 13
1. Create new column as a Year and Day.
2. Create cummulative Column with below dax code:
let me know if this helps
Hi @Sachin001 , thank you for your solution. That is is exact what I'm looking for. I used the Measure option, but you have applied the cumulative sum directly in the table (4). That is a different approach but it works.
Have a great day,
Cornelis
Cumulative Score = // Try this one might help you
VAR SelectedYear = SELECTEDVALUE('Calendar'[Year])
VAR CurrentDay = MAX('Calendar'[DayOfYear])
RETURN
CALCULATE(
SUM('Source'[Score]),
FILTER(
ALL('Calendar'),
'Calendar'[Year] = SelectedYear &&
'Calendar'[DayOfYear] <= CurrentDay
)
)
Dear @mh2587 , thank you for your prompt answer.
The DayOf Year, could you please clarify?
Best regards,
Cornelis
If you don't have DayOfYear Column you can create like following:
DayOfYear = DATEDIFF(STARTOFYEAR('Calendar'[Date]), 'Calendar'[Date], DAY) + 1
Hello @mh2587 , thank you!
I have just applied in Power BI and here is the result:
As you can see, no cumulative calculation. The score 1-2-2025 must be 13, at 02-01-2025 17, at 03-01-2025 20. Something goes wrong.
Any idea?
Best regards,
Cornelis
Check out the April 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 |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 25 | |
| 24 |