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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors