reportdev Posted October 12, 2015 Share Posted October 12, 2015 How to calculate the median of a field in jasper studio?We have a report requirement in which the user would like to get the median of a particular field.I have tried using variables to calculate the median, but the inbuilt calculations does not have a median calculation.After doing some research, found that the org.apache.commons.math3.stat.descriptive.rank has a class called Median, but I don't know how to use this class in jasper studio. Can someone help me in this ? Link to comment Share on other sites More sharing options...
reportdev Posted October 14, 2015 Author Share Posted October 14, 2015 Found that the best way to calculate a median is to create a different dataset with median function in SQL and placing this field in the main report. Map the table parameters to the main report parameters. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now