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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

A countif formula for project count by month

Hi, 

I am new to powerbi and I am trying to create a dashboard to report on active projects. I want to be able to display how many active projects there are for each project manager each month. I have the project manager's name, the projects name, and forcasted closed date.  I am thinking about using it in a line graph.  For example, if Jenny has 5 active projects in January and one of then has a forecasted close date of 2/4/23 then the count for February would be 4 active projects.  I cannot figure out the countif formula to use in the line graph. 

 

Lopezma_0-1675893523433.png

 

1 REPLY 1
FreemanZ
Super User
Super User

hi @Anonymous 

try to 
1) creat an unrelated date table with at least date and month columns
2) write a measure like:
measure =
VAR _mindate = MIN(DateTable[Date])
VAR _maxdate = MAX(DateTable[Date])
RETURN 
COUNTROWS(
    FILTER(
       ALL(TableName), 
       TableName[StartDate]<=_maxdate&&TableName[CloseDate]>=_mindate
    )
)
 
3) plot a line chart visual with datetable[month] column to x axis and the created measure to value, project manager column to the legend.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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