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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.