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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
cathoms
Responsive Resident
Responsive Resident

Cumulative Count of Rows with Start and End Dates

Hello!

 

I've spent most of the day looking up possible solutions and have reviewed a dozen or so threads on this forum to no avail. I have a Power BI report with a SharePoint List as the data source. Among others fields, the dataset I built from the list has ID, Start Date, Actual End Date, and a Status field that can include a value for "Complete". I've been asked to show the cumulative or running total count of active projects. I have a Date table with dates connected to the Start Date field in my Projects fact table. I feel like I am close but missing some key element. I'll share the measure I developed, table visuals showing my current results, and then what I hope to acheive.

 

Measures:

ProjectsCount = DISTINCTCOUNT(Projects[ID])

ProjectsCountTime2 = 
CALCULATE (
    COUNTROWS(Projects),
    FILTER (
        Projects,
        (
        (Projects[Start Date] >= MIN ( Projects[Start Date] )
            && Projects[Start Date] <= MAX(Projects[Start Date]))
        && ISBLANK(Projects[Actual End Date])
       )
   )
)

What I get:

cathoms_0-1683668302227.png

 

What I trying to get:

cathoms_1-1683668788296.png

 

Ultimately I want to create either a line graph or bar chart showing the cumulative active projects over time (by Year-Month). Something like this:

cathoms_2-1683669034217.png

 

Any help would be much appreciated!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cathoms , You have to use a date table in such cases, refer to my HR blog or files attached after signature on the similar topic

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Average of Rolling, Average of Snapshots: https://youtu.be/_pZRdLAJxxA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @cathoms,

 

Are you able to solve this probem ?

 

If Yes, can you please share the solution for the same. Since I am also facing the same issue.

 

Thanks In advance.

 

Aakash

 

cathoms
Responsive Resident
Responsive Resident

The solution is posted above. The last measure I posted worked when I marked my date dimension table as a date table.

amitchandak
Super User
Super User

@cathoms , You have to use a date table in such cases, refer to my HR blog or files attached after signature on the similar topic

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Average of Rolling, Average of Snapshots: https://youtu.be/_pZRdLAJxxA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Alright, so this is really embarassing but it turns out I neglected to mark my Date_LOOKUP table as a date table... 😳

I tried a version of that yesterday and this morning emulated your "Current Employees" measure but got the same results. This is with a Date table with inactive relationships between dates and Start Date and Actual End Date. My measure meant to copy "Current Employees" looks like this:

 

Active Projects = 
CALCULATE (
    COUNTX (
        FILTER (
            Projects,
            Projects[Start Date] <= MAX ( Date_LOOKUP[Dates] )
                && (
                    ISBLANK ( Projects[Actual End Date] )
                )
        ),
        ( Projects[ID] )
    )
)

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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