0 Replies Latest reply: Mar 25, 2011 5:14 AM by Maartje Groenewald RSS

    table if() and fractile ()



      I'm working on a straight table with two dimension (one is called diagnose and one urgency). I calculated the fractile 0,75 of days of length of stay (LOFS) for those two dimensions. This works. Now here's the problem. I would like to have the average of length of stay above the fractile of 0.75 and below the fractile 0,75. I tried

      sum(if( LOFS> fractile( total LOFS, 0.75),LOFS,0))

      This formula is not working because now i'm just counting the LOFS that are above the totalfractile. I want the LOFS that are longer than the fractile for each diagnose and urgency. I tried to use < diagnose, urgency> and without total, but nothing seems to work! The underlying data is one line for each patient with in one column their diagnose, one column with urgency and in one column LOFS .

      If somebody could help me, I would be very grateful!

      Kind regards