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
Anonymous
Not applicable

How to calculate deadlines for a schedule?

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?

 

Milou190_1-1660204011060.png

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

2 ACCEPTED SOLUTIONS
v-kkf-msft
Community Support
Community Support

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)

vkkfmsft_0-1660726046313.png

 

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.

 

View solution in original post

Anonymous
Not applicable

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...)

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

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)

vkkfmsft_0-1660726046313.png

 

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.

 

Anonymous
Not applicable

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...)

lbendlin
Super User
Super User

DateTime values can be treated as decimal numbers.  You can move a date ten days out by adding 10 to it.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.