6 Replies Latest reply on Nov 26, 2018 5:49 PM by swaroop.gantela

    Dividing percentages by percentages in IF statement

    john.garrigan.1

      Hi,

       

      I have a calculated field called PA Denial % which uses the following formula:

       

      SUM([PA Denials])/SUM([Pa Requests])

       

      I now wish to calculate the QoQ figure between Q3 and Q2 2018 but I am running into issues in my new calculated field which should calculate this.

       

      My QoQ PA Denial % calculated field uses the following code:

       

      (sum(if datepart('quarter',[Date Parse Quarter Month]) = 3 then [PA Denial %] end) -

      sum(if datepart('quarter',[Date Parse Quarter Month]) = 2 then [PA Denial %] end))

      /

      sum(if datepart('quarter',[Date Parse Quarter Month]) = 2 then [PA Denial %] end)

       

      I am getting errors about mixing aggregate and non-aggregate comparisons/results in an IF statement, can anyone give me a steer how to fix this?