title: How to sum values based on different conditions in iReport
body: <p>I have 3 columns which looks like the following.</p>
  
  <pre><code>Bucket      Amt     Fixed Amount
  1           10       100
  2           20       200
  3           30       300
  4+          40       400
  </code></pre>
  
  <p>I want to sum values from bucket 2 to 4+ and from bucket 3 to 4+ i.e., my final table should look like the below</p>
  
  <pre><code>Bucket      Amt     Fixed Amount
  1           10       100
  2           20       200
  3           30       300
  4+          40       400
  2-4+        90       900
  3-4+        70       700
  </code></pre>
  
  <p>I created 2 variables "2-4+" and "3-4+".
  Assigned the Calculation to "Sum"
  But how do I write an expression for the same which will sum the value for amt and fixed amount based on the bucket? Can I use conditional statements?
  i.e.,for the first variable 2-4+ sum the value for amt and fixed amount for the buckets between 2 and 4+. Similarly for the second variable.</p>
  
  <p>Any suggestions will be appreciated.
  Thanks!!</p>