cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexFA
New Member

Milestones - how to change the %calculation

Dear all,

Is it possible to change the formula for label lblMilestonePercentCompletion in order to change how the % of project is done. 

I want to assign instead of Done/New/...Status a different Status label - 100%, 75%, 50%, 25% and 0% and to calculate the Average of all the tasks based how many they are in 0, 25, 50, 75 & 100)?

 

lblMilestonePercentCompletion= 

If(CountRows(Filter(colWorkItems, Project.Project = gblProject.Project, Milestone.'Project Milestone' = ThisItem.'Project Milestone' )) = 0,  "0%", With({varCompletionStatus: First(Sort('Project Work Item Statuses', Sequence, Ascending) ).'Project Work Item Status'},With({varPercent: RoundDown(Abs( CountRows(Filter( colWorkItems, Project.Project = gblProject.Project,  Milestone.'Project Milestone' = ThisItem.'Project Milestone', 'Work Item Status'.'Project Work Item Status' = varCompletionStatus    )) / With({varTotalWorkItemCount: CountRows(Filter(colWorkItems, Project.Project = gblProject.Project, Milestone.'Project Milestone' = ThisItem.'Project Milestone'  )  )  },   If(varTotalWorkItemCount = 0 || IsBlank(varTotalWorkItemCount), 1, varTotalWorkItemCount ) ) * 100 / 10), 1)}, Switch(  varPercent, 9.5, 95,9.6, 95, 9.7, 95, 9.8, 95, 9.9, 99, RoundDown(varPercent, 0 ) * 10 ))& "%"))

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,985)