cancel
Showing results for 
Search instead for 
Did you mean: 

Formula help?

Former Member
0 Kudos

My report has duplicates and I only want to sum distinct log_id's in the following formula.  My sum is out of whack due to duplicate records.  How can I only sum the records that meet the criteria below?

if(
{V_VWARE_OPTIME.INOUT}='I' and
{V_VWARE_OPTIME.CASE_CLASS} <> 90 and {V_VWARE_OPTIME.CASE_CLASS} <> 100 and // cases not out-of-or , special procedures
{V_VWARE_OPTIME.LOC_ID} = 1034201 and
not( {V_VWARE_OPTIME.OR_PROC_ID}  IN ['2697','2699','4547','2698','2696'] ) and  // not main or c-sections
not(isnull({V_VWARE_OPTIME.ROOM_IN})) and
not(isnull({V_VWARE_OPTIME.ROOM_OUT})) and
({V_VWARE_OPTIME.ROOM_IN} <> {V_VWARE_OPTIME.ROOM_OUT})
)
then

DateDiff ('n',{V_VWARE_OPTIME.ROOM_IN},{V_VWARE_OPTIME.ROOM_OUT})/60.00

else
0

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Bobby,

Easiest way to workaround the duplicates, is by creating a group on the field/s that is/are causing the duplicates. The field you wish to summarize can then be placed on the Group Header so it evaluates just once.

-Abhilash