The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi folks,
I have the following logic in place to calculate the progress of different project. The below formula works great for the most part but I have noticed that for specific projects like below is showing a 100% for Progress while the project has not ended.
Progress =
VAR DaysSinceStart = DATEDIFF([R_Start Date], TODAY(), DAY)
VAR TotalDuration = DATEDIFF([R_Start Date], 'ITD Projects'[Due Date], DAY)
VAR ProgressValue = DIVIDE(MAX(DaysSinceStart, 0), TotalDuration, 0) -- Ensure DaysSinceStart is not negative
RETURN IF(TODAY() > 'ITD Projects'[Due Date], 1, ProgressValue)
After an hour of checking the logic and trying different ways to show this progress, could you please help and let me know if there anything we can do with this calculation.
Thanks so much for your time.
Solved! Go to Solution.
Hi @kamini,
I think the problem is your IF statament, because you're setting 1 when current date is bigger than ITD Projects Due Date.
Please check if that particular project doesn't have a due date bigger than today (if this case is possible... I don't know your data.)
Proud to be a Super User!
@kamini,
I just see the picture now, so my oldest post doesn't make sense.
How did you get the start date and duedate on that table that you share?
It's possible to have more that one duedate for the same project?
Proud to be a Super User!
Hi @kamini,
I think the problem is your IF statament, because you're setting 1 when current date is bigger than ITD Projects Due Date.
Please check if that particular project doesn't have a due date bigger than today (if this case is possible... I don't know your data.)
Proud to be a Super User!
Hi,
Yes, the Due Date is bigger than today's date by 3 days so the calculation comes to "0.9802631578947368" which is very close to "1". but the project is actually 96% and not 100%. That is the problem and I'm trying to find a way to get Power BI not to round up the number to 1. Very good points you are making,
If you could share some sample pbix file I could taka a look, if you want.
Proud to be a Super User!
Ok I'll email it to you since I don't have a way to share using online methods. Thanks as much!
Ok, I emailed you the same EXCEL and the pbix file. Let me know if you got it! Thanks