jhdean
April 19, 2019, 7:01pm
1
Hi,
I’m dealing with Square transaction exports. Exported fields are limited to groups, any one of which doesn’t include all the data I need.
I’m compromising and having to calculate the merchant fee on my own.
I’m using val(money(«Net Sales»*.0275)).
The issue is if Net Sales - 5,910.00, the result of «Net Sales»*.0275 is 162.525.
The money function converts this to 162.52 and Square actually took 162.53.
Can someone show me a different function to use or a formula which will round up if it ends in 5 as Square is doing?
Thanks,
Jeff
dave
April 19, 2019, 7:17pm
2
I would just add a very small number to tip the scale.
«Net Sales» * .0275 + 0.0000001
instead of
«Net Sales» * .0275
gary
April 19, 2019, 7:27pm
3
I think the round( function can replace both the money( and val( functions,
round(«Net Sales»*.0275) = 162.53
dave
April 19, 2019, 7:41pm
4
I thought of that. The problem is that the round( function is doing floating point math. The rounding errors you typically see there could still tip the scales the wrong way. I still think you need to add a tiny fudge factor to be sure.
jhdean
April 19, 2019, 7:42pm
5
Thanks, Gary
I had tried that but as you have written it, round(«Net Sales».0275), I get an error " Incorrect number of parameters for the round( custom function". I had used round(«Net Sales» .0275,2) but it gets rid of the decimal
dave
April 19, 2019, 7:44pm
6
It should be
round(«Net Sales»*0.0275,0.01)
You are rounding to the nearest multiple of 0.01
gary
April 19, 2019, 7:44pm
7
Oops, I forgot to add the step parameter:
round(«Net Sales»*.0275,0.01) = 162.53
jhdean
April 19, 2019, 7:46pm
8
Super, thanks Gary and Dave. And hello after so many years. : )
Jeff
admin
April 19, 2019, 8:09pm
9
I noticed a few days ago when you renewed your Panorama X account, and meant to drop you a note. So welcome back!!
jhdean
April 19, 2019, 8:27pm
10
Thanks, Jim
I need to go back through the training videos. I’m pretty vague with everything I had learned about Panorama X.