Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe 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.
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!!
Solved! Go to Solution.
Hi,@Gandarthvader .I am glad to help you.
Like this?
I created the following test data based on your description.
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.
Hi,@Gandarthvader .I am glad to help you.
Like this?
I created the following test data based on your description.
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!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
12 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
13 | |
12 |