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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Emilio220
New Member

Count active projects per date

Hi all,


I am struggling with the following: I would like to count the number of active projects per date. For this I want to create an extra column next to the date column (see table 2) to show the number of active projects per date in a visual.

This is the data I'm working with:

Project           Status           Date             
NED000001Released1-1-2021
NED000001Released2-1-2021
NED000001Released3-1-2021
NED000001Canceled10-1-2021
NED000002Released3-1-2021
NED000002Released4-1-2021
NED000002Released5-1-2021
NED000002Released6-1-2021
NED000002Released7-1-2021
NED000002Canceled13-1-2021


This would be the desired result.

Date                Active     
1-1-20211
2-1-20211
3-1-20212
4-1-20212
5-1-20212
6-1-20212
7-1-20212
8-1-20212
9-1-20212
10-1-20211
11-1-20211
12-1-20211
13-1-20211
14-1-20210

 

Can anyone please help me out with that?

2 REPLIES 2
amitchandak
Super User
Super User

@Emilio220 , Create an independent date table and use date from date table in visual

 

try a measure like

calculate(distinctcount(Table[Project]), filter(Table, Date[Date] <= max(Table[Date]) && Table[Status] ="Released")) -
calculate(distinctcount(Table[Project]), filter(Table, Date[Date] <= max(Table[Date]) && Table[Status] ="Canceled"))

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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

@amitchandak,

Thank you for your quick reply.

I have tried the meassure and got the following result: 

Knipsel.PNG

 
However, the project becomes active from the first release date until the canceled date. With this solution it only counts the rows with the dates. Sorry if my explanation was unclear.


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.