Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Pbinewbie43
New Member

Cumulative total from only dates

I have a 1 column table that are just dates an event happened. Each row (date) represents 1 event. Sometimes the same date is listed on multiple rows if an event happened multiple times on that date. Some rows are blank or have 'null' in them. Those are not important for the calculation and must be ignored.

 

Intended result: I would like to build a visual of a line chart. Y axis: number of events, x axis: date with the line showing a cumulative total of events as time progresses.

 

sample date table:

 

Event Date

1/2/2023

null

1/3/2023

1/5/2023

1/5/2023

2/1/2023

2/9/2023

2/9/2023

 

3/1/2023

 

3/19/2023

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

After cleaning the data, load the data into the Data model.  Create a Calendar Table and build a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.  To your visual, drag the Date column from the Calendar Table.  Write these measures:

Count = countrows(Data)

Cumulative count = calculate([count],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vicky_
Super User
Super User

The best way would be to go back into power query and clean your data - to remove the null and blank rows, you can simply click on the down arrow and then "Remove Empty"

vicky__0-1701398772684.png

Change the type of your column to Date, and then you can Close and Apply. 
To create the chart, drag the date to both the x and y axis, and it should automatically agreggate the count per day.

vicky__1-1701398840712.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors