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

0

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.

pathfinder2104.work's picture
Joined: Feb 27 2014 - 8:52pm
Last seen: 5 years 3 months ago

I am able to display the total.

pathfinder2104.work - 5 years 8 months 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

pathfinder2104.work - 5 years 8 months ago

1 Answer:

0

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

hozawa's picture
52642
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week 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.

pathfinder2104.work - 5 years 8 months 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 - 5 years 8 months 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?

pathfinder2104.work - 5 years 8 months ago
Feedback
randomness