21 Replies Latest reply: Jan 8, 2016 1:24 PM by Jim Chan RSS

    How to add a complicated calculation in a loading script?

    Jim Chan

      As I am woking on my script, i hit a problem. I realize i have use such calculation expression and i need to change my existing sum(count) to the below:


      (Sum({<AUTO_FLG = {S}, F_RESULT={1}>} COUNT))  / (Sum({<AUTO_FLG = {S}, K_RESULT={1}>} COUNT))



      This is part of my loading script:





      sum(COUNT) as rc_count,

      'Hit Rate (% in Cases)' as Items

      Resident Table_1

      where AUTO_FLG = 'S' and FRAUD_RESULT = '1'

      GROUP BY KPI_DATE,'Hit Rate (% in Cases)';