
1. Re: Having trouble with percent (average)
Jason Wood Jul 2, 2017 10:37 AM (in response to user29536)I think you'll have to start by explaining what you mean by "average (percentage) for each diagnostic per case"
Run through an example showing how the numbers you've shown us need to be used to arrive at the answer you want.

2. Re: Having trouble with percent (average)
SteveMartino Jul 2, 2017 1:32 PM (in response to Jason Wood)If you could, also explain how you arrived at those numbers.
Are they summary fields?
Is this a sub summary report?
Where do you want to see the numbers? I assume if you're looking for something like:
20% 2CT Scan
10% 1Cat Scan
10% 1MRI
20% 2Ultrasound
40% 4XRay
100%
Your numbers 2,1,1,2,4 are coming from summaries in a subsummary report. If so then the percentage numbers can come from the GetSummary function.
Or are those numbers in a portal of related records?

3. Re: Having trouble with percent (average)
gofmp15 Jul 2, 2017 2:07 PM (in response to user29536)Average is the result of (Total all items) / (Number of Items)
Therefore to get an average of 100% every item would have to be 100%. or item/item
Using the term average is incorrect, therefore.
SteveMartino provides a good question.
Perhaps what you want is a total of the averages which you could get by sum(calcaveragefield) but due to the nature of computer computations you might not get 100% but reasonably close.

4. Re: Having trouble with percent (average)
user29536 Jul 2, 2017 5:23 PM (in response to user29536)There are 8 claims, of those 8 claims there were 11 visits against the claims. On each visit there is a possibility of 2 diagnostics per visits. So a possible 22 diagnostics ordered. I use a list to get the diagnostics and a pattercount to get the number. As you can see in the field.
So of the
2CT Scan
1Cat Scan
1MRI
2Ultrasound
4XRay
these represent the 10 of the possible 22 diagnostics on the 11 visits. This is 45.5%
Leaving 55% for Non Ordered.
Here's the even harder part. Since there is only 8 cases. my task is to come up with the average or
percentage of diagnostics per case.

5. Re: Having trouble with percent (average)
user29536 Jul 3, 2017 8:53 AM (in response to user29536)this works.
Pad ( "None Ordered"; "_" ; 15 ; "left" ) & Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 );2) & ¶ &
Pad ( "CT Scan"; "_" ; 17 ; "left" ) & (1 Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 ) ;2)) * PatternCount( List(OCCNow Visits by Employer Qtr::Diagnostic Study List) ; "CT Scan") * .1 & ¶ &
Pad ( "CAT Scan"; "_" ; 17 ; "left" ) & (1 Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 ) ;2)) * PatternCount( List(OCCNow Visits by Employer Qtr::Diagnostic Study List) ; "CAT Scan") * .1 & ¶ &
Pad ( "MRI"; "_" ; 17 ; "left" ) & (1 Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 ) ;2)) * PatternCount( List(OCCNow Visits by Employer Qtr::Diagnostic Study List) ; "MRI") * .1 & ¶ &
Pad ( "Ultrsound"; "_" ; 17 ; "left" ) & (1 Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 ) ;2)) * PatternCount( List(OCCNow Visits by Employer Qtr::Diagnostic Study List) ; "Ultrasound") * .1 & ¶ &
Pad ( "XRay"; "_" ; 18 ; "left" ) &(1 Round((OCCNow Visits::Sum_Number_Visits * 2  OCCNow Visits::Sum_Diagnostics_Qtr_Count) / (OCCNow Visits::Sum_Number_Visits * 2 ) ;2)) * PatternCount( List(OCCNow Visits by Employer Qtr::Diagnostic Study List) ; "XRay") * .1
resulting in.
None Ordered ___.55
CT Scan________.09
CAT Scan_______.045
MRI____________.045
Ultrsound _______.09
XRay__________.18
Thx for your thoughts