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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Gandarthvader
New Member

Count Number of Projects Integrating in the next 60 days

Hello! I feel like this is probably an easy one that's been answered in the past, but I've been searching and haven't found an answer that works for me. I have a table with "Integration" dates for projects. I'd like to have a measure that counts how many rows have integration dates within the next 60 days (including today) so that I can throw it into a card to display the count.

 

I currently have a card doing a count of the projects with a filter type of Integration where Relative Date is in the next 60 days, and that works if they have projects in that time period, but I also want it to show 0 if they have none opening in the next 60 days instead of "blank" and I don't seem to be able to get that to work unless the count is in a measure that I can add +0 to.

 

The table is called MPL and the column that I'm focusing on is called Integration.

 

Thank you so much for your help!! 

 

 

1 ACCEPTED SOLUTION
v-jtian-msft
Community Support
Community Support

Hi,@Gandarthvader .I am glad to help you.
Like this?

vjtianmsft_0-1736821527935.png


I created the following test data based on your description.

vjtianmsft_1-1736821582097.pngvjtianmsft_2-1736821588992.png

This is my test code:

CountProjectsNext60Days = 
VAR TodayDate = TODAY()
VAR Next60DaysDate = TodayDate + 60
RETURN
CALCULATE(
    COUNTROWS(MPL),
    MPL[Integration] >= TodayDate,
    MPL[Integration] <= Next60DaysDate
) + 0

How many projects have “Integration” dates in the next 60 days (including today), and if there is nothing in the calculation environment to satisfy this, the measure will return blank.
But I added “+0” to the result.
This ensures that if there are no projects, the final result will show 0 instead of blank.

If my understanding is wrong, please let me know, you can announce the direct copy of the data form to provide your test data, or pbix test files that do not contain sensitive data.
You can provide the corresponding data and the expected measure results.
This will help you solve your problem faster.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jtian-msft
Community Support
Community Support

Hi,@Gandarthvader .I am glad to help you.
Like this?

vjtianmsft_0-1736821527935.png


I created the following test data based on your description.

vjtianmsft_1-1736821582097.pngvjtianmsft_2-1736821588992.png

This is my test code:

CountProjectsNext60Days = 
VAR TodayDate = TODAY()
VAR Next60DaysDate = TodayDate + 60
RETURN
CALCULATE(
    COUNTROWS(MPL),
    MPL[Integration] >= TodayDate,
    MPL[Integration] <= Next60DaysDate
) + 0

How many projects have “Integration” dates in the next 60 days (including today), and if there is nothing in the calculation environment to satisfy this, the measure will return blank.
But I added “+0” to the result.
This ensures that if there are no projects, the final result will show 0 instead of blank.

If my understanding is wrong, please let me know, you can announce the direct copy of the data form to provide your test data, or pbix test files that do not contain sensitive data.
You can provide the corresponding data and the expected measure results.
This will help you solve your problem faster.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes, that works perfectly. Thank you so much for the help!!

Hi,@Gandarthvader .Thank you for your reply.
You are welcome.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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