Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there,
I just started an internship at a company and was asked to make changes to one of their project management tools. I'm having a little trouble mastering the power bi, so I'm asking for your help!
To manage the projects, there is an element that allows to compare the planned date with the actual date. For example, phase 1 of the project must be done on September 1 (planned date) but in reality the team is a little late and does it on September 10. We therefore have a "schedule" element where the two dates are displayed (each is in the form of a column in a table).
Thus, I was asked to calculate the delay for each box (10 days late for the previous example) or possibly the days ahead. I can't find any relevant video on the subject, does anyone have any idea how this could be done?
I have to calculate the deadlines for 6 project phases: explo, dev, IC... For the dates, we have in the table: forecasted_explo_date (for forecasted) and expo_date (for currently planned) ; forecasted_dev_date and dev_date ; ...
For example, here in dev delay, I have to display a delay of 38 days, 8 days in the IC phase... But in explo delay I don't have any data so I don't have to display anything.
Thanks in advance
Solved! Go to Solution.
Hi @Anonymous ,
Please try the new column.
Column =
var diff = IF( ISERROR(DATEVALUE([Forecated])),BLANK(), DATEDIFF(DATEVALUE([Forecated]), DATEVALUE([Currently Planned]), DAY))
return
IF(diff < 0,BLANK(), diff)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Thank you very much for taking the time to answer me. I think your solution could have completely worked but here is what I did (and which works aha) for explo delays for example:
Explo Delay = DATEDIFF('Projects'[forecasted_explo_date], 'Projects'[expo_date], DAY)
and the difference is calculated in days!
But thanks again for your response! I think it would have been a little more complicated to make a new column (especially as an intern I don't know if I'm allowed to modify the data tables...)
Hi @Anonymous ,
Please try the new column.
Column =
var diff = IF( ISERROR(DATEVALUE([Forecated])),BLANK(), DATEDIFF(DATEVALUE([Forecated]), DATEVALUE([Currently Planned]), DAY))
return
IF(diff < 0,BLANK(), diff)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Thank you very much for taking the time to answer me. I think your solution could have completely worked but here is what I did (and which works aha) for explo delays for example:
Explo Delay = DATEDIFF('Projects'[forecasted_explo_date], 'Projects'[expo_date], DAY)
and the difference is calculated in days!
But thanks again for your response! I think it would have been a little more complicated to make a new column (especially as an intern I don't know if I'm allowed to modify the data tables...)
DateTime values can be treated as decimal numbers. You can move a date ten days out by adding 10 to it.
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |