Skip to main content
Solved

How to round of method remove to division calculation in Report Designer


Forum|alt.badge.img

Example: Total value is 30, Sales is 7. so when i check percentage calculation, Percentage  = (sales/total)*100. but output shown is 0. how to check percentage?

Best answer by jesuscruz97

I got the same issue and figure it out. When you add to the variables add the values with decimal places. 

For examples:  If you have $totalitems +1, use $totalitems + 1.00

when you make the division it will bring decimal places in the result. 


Jesus

View original
Did this topic help you find an answer to your question?

15 replies

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 642 replies
  • November 8, 2023

Can you show me the formula on the Report. It this a Total on the Report or on each line would need to see it to advise as 0 implies you must have one of the fields wrong


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 10, 2023

$TotalNumber = 7

$TotalGood = 30

=($TotalNumber/$TotalGood)*100


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 10, 2023

its show 0


dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 642 replies
  • November 10, 2023

I would need to see it on the report itself as your formula is correct but where is the TotalNumber and TotalGood getting its value from as in the lines on the report. I suspect these are not getting their values from the detail section?


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 10, 2023

The reportfooter Total line Variables are working. then when i give $totalnumber/$totalgood output coming to 4, not showing to 4.28 , its take roundoff, so i need proper value


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 10, 2023

This is report output


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 17, 2023
dcomerford wrote:

I would need to see it on the report itself as your formula is correct but where is the TotalNumber and TotalGood getting its value from as in the lines on the report. I suspect these are not getting their values from the detail section?

i get grouping tab, see my screenshot under total have show correctly


dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 642 replies
  • November 17, 2023

Have you tried =[$TotalGood]/[$TotalNumber] i dont have the report to try it on


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 20, 2023
dcomerford wrote:

Have you tried =[$TotalGood]/[$TotalNumber] i dont have the report to try it on

No still show to 0.00


miguel80
Semi-Pro II
Forum|alt.badge.img+1
  • Semi-Pro II
  • 71 replies
  • November 21, 2023

Hi,

I have a question, why are you using the “POW” function? Do you need the number to be squared? Also, I would like to see the “format” atrribute value for that field.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 17 replies
  • November 24, 2023
miguel80 wrote:

Hi,

I have a question, why are you using the “POW” function? Do you need the number to be squared? Also, I would like to see the “format” atrribute value for that field.

No need to Squared. just i want 4/25 value is 0.16, but its show 0. thats is the problem


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2754 replies
  • December 18, 2023

Hi @prabhu83 were you able to find a solution? Thank you!


I’m also experiencing the same issue with formulas seemingly not calculating correctly. I’m building a custom time summary report that tracks billable hours, non-billable hours, and time off for each employee:
 

   

Here is an example where we fetch the relevant fields, we then divide the [35 billable hours ] / [43 total hours] and expect to see 81.4%. Instead, we see 0% Billable. Correct formula below for Current Period Billable % column:

(we need to treat time off as separate from total hours for an idiosyncratic reason elsewhere in the report, so apologies for the confusing naming convention). 

 

Interestingly, when I eliminate the “time off” from the total hours, then I correctly see the expected answer of 100% (35 hours / 35 hours) . This tells me somehow Acumatica is either treating this division calc as binary? or maybe has some severe rounding logic going on under the hood? 
 

 

 

 

Has anyone else ever experienced this? Any thoughts on what I’m doing wrong?

 

 


jesuscruz97
Jr Varsity II
  • Jr Varsity II
  • 17 replies
  • Answer
  • November 13, 2024

I got the same issue and figure it out. When you add to the variables add the values with decimal places. 

For examples:  If you have $totalitems +1, use $totalitems + 1.00

when you make the division it will bring decimal places in the result. 


Jesus


darylbowman
Captain II
Forum|alt.badge.img+13

You should also be able to force calculations as a decimal by using CDec:

=$BillableHours/CDec($TotalHours+CDec($TimeOff))

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings