Percentage Calculations

Discussion of the version of HanDBase that runs on the iPhone and iPod touch devices. This includes the synchronization conduits as well.

Percentage Calculations

Postby ehart » Thu Oct 12, 2017 8:38 am

Hello guys, a new forum member here, although I have been a HanDBase user since my first iPhone, which was the iPhone 3G.

I have created lots of custom databases through the years, but my latest project has me baffled.

I have a simple calculation for the percentage increase or decrease between two fields and the result should be 2.40. But all I can get out of HanDBase is 2.00. Then it'll jump to 3.00 for the next level if my values increase or 1.00 if they decline, ignoring the partial percentages in between.

I've even tried the "Floor" function as part of my calculation. My decimal is set to "2 Places."

What am I missing or not including.

Thanks for your help.

Earnest
ehart
 
Posts: 1
Joined: Thu Oct 12, 2017 8:23 am

Re: Percentage Calculations

Postby ddhsoftwareadmin » Thu Oct 19, 2017 10:03 am

Hi,

Thanks for writing! Could you tell us what sort of formula you have for your percentage increase? And what the field types are that are being used in the calculation? That should help me get an idea of where you are with this!
ddhsoftwareadmin
Site Admin
 
Posts: 237
Joined: Tue Dec 09, 2008 2:13 pm

Re: Percentage Calculations

Postby mjhanna » Thu Oct 19, 2017 10:15 am

I am guessing that the problem is "My decimal is set to "2 Places." Percentage is simply a display representation of the decimal value. Thus the 2 places decimal value of 0.02 will display as 2.00%. I think that if you want to see two more places past the '2' you must set a decimal value to 4 places. Then a decimal value of 0.0225 at 4 places will display as 2.25%. I haven't tested it but would guess this is the case.
Michael
(Only a user and not affiliated with DDH Software, but working with computer databases for over fifty years.)
mjhanna
 
Posts: 156
Joined: Tue Oct 15, 2013 10:56 am
Location: New Mexico

Re: Percentage Calculations

Postby ddhsoftwareadmin » Thu Oct 19, 2017 10:53 am

mjhanna wrote:I am guessing that the problem is "My decimal is set to "2 Places." Percentage is simply a display representation of the decimal value. Thus the 2 places decimal value of 0.02 will display as 2.00%. I think that if you want to see two more places past the '2' you must set a decimal value to 4 places. Then a decimal value of 0.0225 at 4 places will display as 2.25%. I haven't tested it but would guess this is the case.


You are probably correct in that- that's some great thinking on your feet there!
ddhsoftwareadmin
Site Admin
 
Posts: 237
Joined: Tue Dec 09, 2008 2:13 pm


Return to HanDBase for iPhone and iPod touch

Who is online

Users browsing this forum: No registered users and 1 guest

cron