ShowAll Questionssorted byDate Posted
Colleen Burnsed 8

# Rounding numbers up to the next quarter increment

I have a summed value of 5.57, i want this value to be 5.75 (the next rounded quarter). If I try ROUND(5.57+.124, 2) this returns 5.69 not 5.75. What am I missing?
Charisse de Belen
Hi Colleen,

Try something like this:
`ROUND((5.57 + 0.124)*4, 0) / 4`

Charisse de Belen
Hi Colleen,

If my answer was of help to you, please consider marking it as the Best Answer so this question can be marked as Solved. If it is not working, please let us know so we can look for another solution.
Colleen Burnsed 8
I’m still waiting to test and hoping to get to it today. Waiting on one setting update from Salesforce support. Will post on the results. Thank you!
Colleen Burnsed 8
Charisse, I tried this but unfortunately the system did not like the period in the .124. To expand the formula receives its data from a fields within salesforce, i used an abbreviated version that i could just apply the logic to. Below is my actual formula.

((IF([Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c != 0,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X971__c)) + [Property_Billable__c].Branch_State_Fees_Taxes__c.Other_Insurance_Coverage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Corporate_Admin_Cost_Percentage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Woker_Comp_Buffer__c)*100
Charisse de Belen
Can you post your formula including the rounding logic?
Colleen Burnsed 8
Right now i have the formula without Rounding because i don't want it to go to the closest whole number. Ideally though it rounds to the closest quarter to be more accurate. The formula below goes into a percentage field and it updates based on a trigger in Process Builder,

((IF([Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c != 0,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X971__c)) + [Property_Billable__c].Branch_State_Fees_Taxes__c.Other_Insurance_Coverage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Corporate_Admin_Cost_Percentage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Woker_Comp_Buffer__c)*100
Charisse de Belen
You mentioned before that you tried to implement the rounding logic I suggested, but it didn't work. Can you show me what the formula looked like with that rounding logic included, so I can see why it didn't work?
Colleen Burnsed 8
Sorry about that misread your question. I wasn't able to save and execute it because i received an error about invalid function of '.' I'm building this in process builder as an action so process builder would not accept .124 as part of the formula.

Here is what i was playing around with in sandbox;
ROUND(
((IF([Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c != 0,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X971__c)) + [Property_Billable__c].Branch_State_Fees_Taxes__c.Other_Insurance_Coverage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Corporate_Admin_Cost_Percentage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Woker_Comp_Buffer__c)*4,0)/4

If you notice i don't have the .124 in there but that above formula did not get the right results.
Charisse de Belen
Can you try it again but with 0.124 instead of .124?
Colleen Burnsed 8
It saved with 0.124. Thanks! I’ll have to give that a thorough testing. Does the placement look correct for it: ROUND( ((IF([Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c != 0, [Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c, [Property_Billable__c].Branch_State_Fees_Taxes__c.X971__c)) + [Property_Billable__c].Branch_State_Fees_Taxes__c.Other_Insurance_Coverage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Corporate_Admin_Cost_Percentage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Woker_Comp_Buffer__c)+0.124*4,0)/4
Charisse de Belen
I think you might still want to multiply by 100 before you add the 0.124. Try this:

ROUND((((IF([Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c != 0,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X9015__c,
[Property_Billable__c].Branch_State_Fees_Taxes__c.X971__c)) + [Property_Billable__c].Branch_State_Fees_Taxes__c.Other_Insurance_Coverage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Corporate_Admin_Cost_Percentage__c + [Property_Billable__c].Branch_State_Fees_Taxes__c.Woker_Comp_Buffer__c)*100 + 0.124)*4, 0) / 4