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

Percentage Expression not Getting Correct Results


justin.watts

Recommended Posts

Hello,

I have an expression to get a percentage for each group.  However, the percentages don't calculate correctly for every group and some are not even close to being correct.  Here is my expression:

$V{GTCount}.divide($V{StuCount},5,RoundingMode.HALF_UP).multiply(new BigDecimal(100))

I have my reset type set to my group (Group By).  

For my first record, I have 146 for the GTCount and 2056 for the StuCount.  However, my percentage comes out to 21.89 and it should be 7.10.  Why is this so far off?  Some of these calculations are closer in accuracy (for example, in another record I have 1 for the GTCount and 2056 for the StuCount and I get 0.05, which is correct), but most of them are off.  Is there something in my formula that is causing this?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...