Jump to content
We've recently updated our Privacy Statement, available here ×

arceliza

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by arceliza

  1. Here’s the scenario: Items A B C D E F G Group1 I1 1 2 4 2 0.10 2.00 0.20 I2 2 2 4 4 0.20 2.00 0.40 Totals 8 6 0.60 Group2 I3 3 2 2 6 0.30 1.00 0.30 I4 4 2 1 8 0.40 0.50 0.20 Totals 3 14 0.50
  2. Re: Summation by group Here’s the scenario: Items A B C D E F G Group1 I1 1 2 4 2 0.10 2.00 0.20 I2 2 2 4 4 0.20 2.00 0.40 Totals 8 6 0.60 Group2 I3 3 2 2 6 0.30 1.00 0.30 I4 4 2 1 8 0.40 0.50 0.20 Totals 3 14 0.50 Given: A, B & C Computation: D = A * B E = D / SUM [D] F = C / B G = E * F = new Double( (($F{A}.doubleValue() * $F{B}.doubleValue()) / $V{SUM_G}.doubleValue() ) The summation for C & D didn't have a problem since I directly get the fields. I had a problem getting the summation for G per group since it involves computation with summation of overall totals for D. It gives a different result. I added a new variable (SUM_G) which has a class type of java.lang.Double and calculation type is Sum. Its reset type is Group and the reset group is the group I added. Does it have something to do with the evaluation time of the variable? How can I get the correct result? Thanks
×
×
  • Create New...