Jump to content
Server Maintenance This Week. ×

Calculation that did not work..! Percentage old way...!


This topic is 3966 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I'll bet I reached the full extend of my Right brain here..!!!!

 

I have a number field A with number of places (ie 47) in the main table.

I have a number field B with number of used places (ie 38) in a secondary table - of course related by ID relationship

 

I made a calculation filed to have a percentage of occupancy with the following

 

Round ( ( B/ A) * 100 ) ; 0)... in the hope to read '81'.. but nope I tried a several configurations, and verified field to be numbers etc...

 

I feel my math form secondary school are lost... Why a calculation field does want to give a result..??

 

Thank in advance

Link to comment
Share on other sites

simply '?' and I checked again, details..!!! I made a new field in the secondary table to capture the original field A that works perfect, and still have '?' as a result..!!

Link to comment
Share on other sites

Text in a number field? 

 

Field isn't big enough to show all of the result? Click into the field in browse mode and see what shows.

 

Is there a anything in the field beside numbers? You might try Filter (your field ; "0123456789" )

 

Post a copy of the file.

Link to comment
Share on other sites

in browse mode I have the '?' only and nothing else. I tried to limit the number by using number of decimals but that does not change anything.

The relationship work OK because, the field I created in the secondary table with field A data from the main table is working perfect..!

Let me try your idea of filter.

Thanks

Link to comment
Share on other sites

I did so and it did not change anything, the fact is field A is a calculated field (result number). and that is the point...having a calculation with number type filed that does not work ether using original field (see first post) and later on using a new field created in the secondary database with only purpose is to recover the original A field number. this field is a number field too lookup calculation. 

 

Arrrrhhhhhh.... my right brain hurts..!!

Link to comment
Share on other sites

I think you misunderstood me. I wasn't looking for the result to change. I wanted to see what the result was in the DataViewer when you were watching GetAsNumber ( A ).

 

 

My guess is that A is returning either nothing or zero, which is why when you have: B / A     it would result in a ?, because you cant divide by zero or empty.

Link to comment
Share on other sites

This topic is 3966 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.