I am trying to mimic a rating system call PACP for sewer rating.
Grading happens on a series of potential of 12 issues. Each issue is individually rated 1 through 5, with 5 being the worst if recorded.
I am looking to specifically create these three calculations based on the following scenario.
The following observations were made -
Grease- severity 4
Rags – severity 2
Brick/Masonry – severity 3
Pipe – severity 5
Sewage – severity 4
Calculation 1:
Quick Maintenance Rating: Example 5142
1st digit is the highest severity grade
2nd digit is the total number of occurrences of the highest severity grade
3rd digit is the second highest severity grade
4th digit is the total number of occurrences of the second highest severity grade
Calculation 2:
Maintenance Pipe Rating:
Solution from Calculation 1 is basis for this rating:
(highest severity grade x number of occurrences) + (next highest severity grade x number of occurences)
Example: 5142 - (5x1)+(4x2)= 13
Calculation 3:
Maintenance Pipe Rating divided by the total number of maintenance pipe defects
Example:
Maintenance Pipe Rating = 13
Total number of pipe defects = 5
Solution = 2.6
I can get some of these to make sense such as using max to find which was the max severity rating. I can get a "total" of a rating by simple addition by using a if statement, and division of the sum by the rating number itself.
After which I just cannot wrap my head around it.
What I need is a way to actually tie the max number and the second highest number to counts for each. One way I though was using the Large function like in Excel, but that does not exist in Survey123.
Can I actually pull these three calculations off?
Attached is my survey thus far.