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.
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:
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!
You may check if the post below helps.
https://community.powerbi.com/t5/Desktop/DateAdd-returns-blank-values/m-p/58742#M24060
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
81 | |
70 | |
61 |
User | Count |
---|---|
148 | |
116 | |
104 | |
89 | |
65 |