Can I calculate average of a column which I created from another calculation?

Hi all,

Thank you all for responses to my question and for reading them,

I post a question about creating a third column which is derived from the two values in same row. Now the question is to calculate the average of this column. How can I calculate the average?


Thank you.'s picture
Joined: Feb 27 2014 - 8:52pm
Last seen: 8 years 7 months ago

I am able to display the total. - 9 years 1 week ago

I am using a list to display this data and I want to display the average out side the list. (Just below the list). I am calculating the third column using the "total sold" and "total in stock" columns - 9 years 1 week ago

1 Answer:

If you have the total, just use the .divide() to find the average.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

One question is I can create total just by drag and drop that % field in my report but can I store it in any variable just like I do in programming language ?? Further I want to use this stored variable value in my calculation can I do this ?? If I can How ???
Some pointers or some examples needed if you can provide any that would be great help. - 9 years 6 days ago

When you drag and drop and create SUM, Jaspersoft Studio will create a variable (ie. $V{}.
Read up on using Variables in Jaspersoft Studio in "Jaspersoft Studio user Guide" Chapter 9: Variables

hozawa - 9 years 6 days ago

The trouble is that sum variable is inside a list and the total part that I am showing is outside the list, Now I created a third column dynamically and I want to calculate the average of this third column outside the list. is it possible? - 9 years 4 days ago