0 Replies Latest reply: Oct 16, 2018 12:15 AM by kaushal kaushik RSS

    Sum Between A Range Value

    kaushal kaushik

      Hi All,


      I have a scenario where I need to sum the Amount field based on the Group code(RKBIT1 is field name)



      Now the amount for Group Code 1001 , 1006 1009, 1011 are coming correct, wherein I have used formula

           if(Flag=1,sum({<RVYEA4={"<$(=max(RVYEA4))"}>}Total_Amount)). (Group_Code Image1)


      Now  I have a table Group Range listed below(Group_Code Image)

      For Ex:-

      In this I have to find the sum between the range i.e 1006-1009 means value for 1006 ,1007,1008 and 1009. Since value for 1007 & 1008 is '0' so total sum value should be 142790+(-16907)= 125883 i.e for 1006 & 1009 respectively. Kindly Suggest me how should I achieve it.


      I have used this formula:-


      Group Sum= if(Flag=1,sum({<RVYEA4={"<$(=max(RVYEA4))"},RKBIT1={">=$(=mid(SubField(Group_Range,'-',1),2,4))"},RKBIT1={"<=$(=mid(SubField(Group_Range,'-',2),1,4))"}>}Total_Amount)).


      Kindly Help!!