4 Replies Latest reply on May 8, 2018 11:46 PM by Elie Rahi

# Calculation for Missing Values

I need a row-by-row calculation. I've attached data showing duration times for each type of person. However those that "Checked out session end" = 1 then estimate the duration by the median duration.

For example the median duration for parents is 0.7 hour; This would be the estimated duration for parents with checked out session end = 1. So I'm thinking something like this:

IF Checked out session end = 1 AND Visitor = Parents THEN median(Duration)

ELSEIF Checked out session end = 1 AND Visitor = Patients THEN median(Duration)

etc...

Something is not working out for me

• ###### 1. Re: Calculation for Missing Values

Hi, Elie

Can you explain more detail about how you get the 0.7 as median for parent?

ZZ

• ###### 2. Re: Calculation for Missing Values

Hello,

my apologies I uploaded the incorrect data. Please see attached the correct one.

The median duration for parents with "Checked out at session end" = 0 is 0.7 hours. The duration times for "Checked out at session end" = 1 are all incorrect. Hence I am estimating the duration by using the median. So in other words I need the duration times for parents with "Checked  out session end" = 1 to be all 0.7. And similarly for siblings, patients etc. But siblings, patients.. have all different median durations

• ###### 3. Re: Calculation for Missing Values

Hi,

{ FIXED [Type Visitor (orbit)] : MEDIAN(

IF [Checked out at Session end]= 0

THEN [Duration (hours)]

END)}

D

1 of 1 people found this helpful
• ###### 4. Re: Calculation for Missing Values

Hi David,

Thank you! I've used your LOD calculation in another calc:

IF [Checked Out at Session End] = 1 THEN [LOD]

ELSE [Duration]

END

This is what I was after.