- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Incorrect Cumulative Sum for Non Continuous Date
I am trying to plot a line graph using cumulative sum and Date (Non Continious) the issue is the line graph is broken
Measure Code
Cumulative Offer and acceptance Count =
VAR CurrentRowDate = MAX('srs_cap'[cap_decd])
RETURN
CALCULATE(
countrows('srs_cap'),
'srs_cap'[cap_decd] <= CurrentRowDate
)
When i am extracting the data of line chart it is showing as
Cumulative Offer and acceptance Count , Date.
899 03/07/2024 00:00
904 04/07/2024 00:00
1 05/07/2024 00:00
907 08/07/2024 00:00
1 09/07/2024 00:00
910 10/07/2024 00:00
913 11/07/2024 00:00
1 15/07/2024 00:00
915 16/07/2024 00:00
916 17/07/2024 00:00
923 18/07/2024 00:00
928 19/07/2024 00:00
I can see the issue as sum is breaking at some date for eg
913 11/07/2024 00:00
1 15/07/2024 00:00
915 16/07/2024 00:00
it should be 914 on 15/07/2024 instead of 1.
i tried changing X axis to categorical and Continious, Created a Custom Date table, How can i fix this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @gautampruthi - Can you double-check the relationships between your tables and ensure that the Date table covers the entire date range relevant to your data.The main problem is that your cumulative sum calculation doesn't properly handle gaps in the dates, causing it to reset when there's no data for a particular date.
you need to adjust your cumulative measure to reference the Date table rather than just the dates in the srs_cap table.
Cumulative Offer and Acceptance Count =
VAR CurrentRowDate = MAX('DateTable'[Date])
RETURN
CALCULATE(
COUNTROWS('srs_cap'),
'srs_cap'[cap_decd] <= CurrentRowDate,
ALL('DateTable')
)
The cumulative sum should now increment properly, avoiding resets where there are no data points for certain dates.
Hope it helps
Proud to be a Super User! | |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Do you have a date table? It doesn't look like it. Your transaction table contains only the dates of the transactions. It is not possible to return a value (cumulative value in this case) for a date that doesn't exist in your loaded data. If you add a date table containing all dates (including those that have no sales), then you can build the chart you need.
https://exceleratorbi.com.au/power-bi-calendar-tables/
* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @gautampruthi - Can you double-check the relationships between your tables and ensure that the Date table covers the entire date range relevant to your data.The main problem is that your cumulative sum calculation doesn't properly handle gaps in the dates, causing it to reset when there's no data for a particular date.
you need to adjust your cumulative measure to reference the Date table rather than just the dates in the srs_cap table.
Cumulative Offer and Acceptance Count =
VAR CurrentRowDate = MAX('DateTable'[Date])
RETURN
CALCULATE(
COUNTROWS('srs_cap'),
'srs_cap'[cap_decd] <= CurrentRowDate,
ALL('DateTable')
)
The cumulative sum should now increment properly, avoiding resets where there are no data points for certain dates.
Hope it helps
Proud to be a Super User! | |

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
08-13-2024 04:50 PM | |||
08-21-2024 11:40 AM | |||
09-25-2024 09:09 AM | |||
06-24-2024 02:09 AM | |||
05-11-2024 11:06 AM |
User | Count |
---|---|
128 | |
100 | |
85 | |
53 | |
46 |