2 Replies Latest reply: Aug 12, 2013 4:55 PM by Sergey Belostotsky RSS

    sum(if(Cal=AccCal,Fact)) without IF.

    Sergey Belostotsky

      Hello, guys. I need your help.

       

      I have 2 tables

       

       

      CalAccCal
      11
      12
      22
      13
      23
      33


       

       

       

      CalFactParam
      1100a
      2200a
      3300a
      1100b
      2200b
      3300b

       

      I need to calculate the sum (Fact) from both accumulated calendar and simple calendar in the same report.

       

       

      AccCal123
      Para
      a100100200300300600
      b100100200300300600

       

       

       

      sum({<Cal = {"=AccCal=max(Cal)"}>} Fact)

      sum({<Cal = {"=AccCal=Cal"}>} Fact)

      sum({<Cal = {"=AccCal"}>} Fact)

      Result:

       

      AccCal123
      Para
      a01000300300600
      b01000300300600

       

       

      If I use sum(if(Cal=AccCal,Fact))

      than I get the right result!: but with the big data it is impossible.

       

      AccCal123
      Para
      a100100200300300600
      b100100200300300600

       

      How can I get the same result by using set expressions?

       

      The sample application in the attachment.

       

      Tnx a lot!