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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bwill112
Frequent Visitor

Help with Report Due Date Calculations

I have a date calculation situation that I am really struggling with and I hope someone can give me some guidance! I need to calculate annual report due dates for reports due a certain number of days (30, 45, 60, and 90) after the anniversary of the start date of the project. For example, if the project started on 12/28/2014, the due date for the report would be on 01/27 (30 days), 02/11 (60 days), etc., of every year after 2014. I also have a report due 90 days before the anniversary of the start date.

 

The calendar table I have now uses DATEDIFF to calculate the year difference between the s/equence of reference dates and the project anniversary date. However when the calendar year changes, so does the year difference, which throws off all of the calculations:

image.png

 

For these report due dates, I only need calculations for future dates, not for calendar dates that have already passed.

The reports due 90 days before the start of the project have the opposite problem. Unless I set the year equal to only the year right now, the reports show a due date in the past. 

Where am I going wrong? What am I missing? I’m sure there’s a better way to calculate even the project anniversary date, but I have no idea how. I’ve tried almost every DAX expression combination I could find, but none seem to do the trick. I've asked something similar about this in the past, but with no luck. I will take any suggestion I can get. The example PBI file I've been working with can be found here.

Thanks for your help!

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@bwill112 

 

You may check if the post below helps.

https://community.powerbi.com/t5/Desktop/DateAdd-returns-blank-values/m-p/58742#M24060

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I appreciate your suggestion, but the post wasn't exactly what I was looking for. 

 

After months of frustration, I was finally able to solve my problem with a rather convoluted work-around.

 

Thanks though!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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