Salesforce and other SMB Solutions are coming soon. ×

# Percent Complete

## Recommended Posts

I would love to be able to make an estimation on the percentage of a project that is complete based on its jobs status.

Jobs have multiple levels of status.

New (which would be the equivalent of 0%)

Change Order (which would be the equivalent of 20%)

In Progress (which would be the equivalent of 25%)

Submitted (which would be the equivalent of 50%)

Go For Broke (which would be the equivalent of 75%)

Approved (which would be the equivalent of 100%)

I would like the sum all of the status then divide by the number of jobs obviously, but I dont know how to assign a percentage to a Text based status, and I dont know how to create a calculation that complex either.

Any help would be appreciated.

Fred

##### Share on other sites

I'm not quite following you, Fred. You want the average? If you already know the JobStatus then you can use a calculation ( number ) called cPercentComplete with:

Case (

JobStatus = "Change Order" ; 20 ;

JobStatus = "In Progress" ; 25 ;

JobStatus = "Submitted" ; 50 ;

JobStatus = "Go For Broke" ; 75 ;

JobStatus = "Approved" ; 100 ;

0

)

... but it just doesn't quite make sense that "I would like the sum all of the status then divide by the number of jobs..." unless there were multiple jobs - meaning you have a 1:n (one-to-many relationship) from (example) Projects (one side) to Jobs (many side). If you have a 1:n then a calculation in your main file (Projects) would then determine the AVERAGE Project completion (of all its jobs) with calculation (number) of:

Div ( Sum ( Jobs::cPercentComplete ) ; Count ( Jobs::uniqueID ) )

LaRetta smiley-smile

##### Share on other sites

That worked Fantastically! Thank you. I should have known to use a CASE function, but I am still not there yet, where I know which function to use when. Thank you!

Fred

##### Share on other sites

What about the next step. Based on that final percentage Number, I would love to show a progress bar graphic. Sort of like a red to yellow to green gradient that reveals a specific amount of the graphic based on the Final Sum of the percentage complete.

Has anyone done anything like that?

Right now its working fine to get the data result, IE: Project A is 65% Complete, Project B is 25% complete.

But would love to add to that a little graphic...

Thanks

Fred

##### Share on other sites

Ok, so I am assuming you have a Projects ---

In the Jobs file you have the calculation from LaRetta which yields a (progress) number for each job.

So in the Projects table you would have a calculation like:

CompletionStatus = Int( Average ( Jobs::JobStatusPercent ) )

And you could show this as a pretty coloured progress bar using:

CompletionStatusBar =

TextColor( Left ( "|||||||||||||||||||||||||" ; CompletionStatus ); RGB ( 225 ; 0 ; 0 ) ) & // first 25% are red

TextColor( Left ( "|||||||||||||||||||||||||" ; CompletionStatus - 25 ); RGB ( 225 ; 80 ; 0 ) ) & // next 25% are orange

TextColor( Left ( "|||||||||||||||||||||||||" ; CompletionStatus - 50 ); RGB ( 225 ; 170 ; 0 ) ) & // next 25% are yellow

TextColor( Left ( "|||||||||||||||||||||||||" ; CompletionStatus - 75 ); RGB ( 100 ; 170 ; 0 ) ) // last 25% are green

So it looks like the attached image.

Is that what you are after?

• ### Images

• 0
By Soliant Consulting,
• 0
By Soliant Consulting,
• 0
By Soliant Consulting,
• ### Forum Statistics

• Total Topics
33.6k
• Total Posts
141.5k
×
×
• Create New...