Showing results for 
Search instead for 
Did you mean: 

BO Webi - Looking to Calculate an Average Time for a Group of Orders

0 Kudos

Hi. I am trying to group orders together into buckets and calculate the average turnaround time for each. I am currently getting a #MULTIVALUE error on my table. Any suggestions would be a big help.

Main Query

Lab Orders

=If [Primary Orderable Item Mnemonic] InList ("Complete Blood Count w/Diff Auto";"Complete Blood Count w/o Diff";"Prothrombin Time w/INR";"PTT";"APTT";"Partial Thromboplastin Time") Then "Hematology" ElseIf [Primary Orderable Item Mnemonic] InList ("CMP";"Comprehensive Metabolic Profile";"BNP";"Creatinine") Then "Chemistry" Else "Other"

Time Diff (Order to Completed)

=TimeBetween([Order Date & Time];[Completed Date & Time];MinutePeriod)

Order to Completed (MM)
=If [Time Diff (Order to Completed)] >= 0
 And Not(IsNull([Order Date & Time]))
 Then [Time Diff (Order to Completed)]

I'm trying to create a summary like this to display the average turnaround time (order to completed) for each group

=Average([Order to Completed (MM)]

Accepted Solutions (0)

Answers (2)

Answers (2)

Active Contributor

Change the average formula to:

=Average([Order to Completed (MM)] ForEach ([Primary Orderable Item Mnenomic]; [Order Date & Time];[Completed Date & Time])) In([Lab Orders])


hope this solves the problem and helps

0 Kudos

That worked, thanks so much!

Active Contributor
0 Kudos

kindly accept the answer and close the question

Active Contributor
0 Kudos

Try with adding foreach() in the below formula

=TimeBetween([Order Date & Time];[Completed Date & Time];MinutePeriod) foreach ([Primary Orderable Item Mnemonic])
0 Kudos

Hi Amit. I created the new formula you provided. I tried using it with different variables, but I keep getting the #MULTIVALUE error. Maybe I am doing something wrong. What should I use the new variable for?