Jump to content
  • 0

Calculated value not returning decimals


JustAnotherLogin
 Share

Question

I am attempting to collect time in seconds and using virtual field and calculated data, place in a table in decimal format.

I have in the calculated field the following formula

([@Virtual1]/60) 

The user input time in seconds  (ie. 145)  and the field in the data should display 2.416666. But it is not. It is displaying 2

 I have attempted using Functions (Str, Round, Abs) and using formatting in the Datapage Elements.

The  field type in the table is Number. 

The field is hidden on the datapage.

Where is my mistake?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I think the virtual field is being rendered as an integer which is causing the output to be rounded off to the nearest whole value.

Try this formula to convert the virtual field to a float/number data type first before the calculation:

CONVERT(FLOAT, [@cbParamVirtual1]) / 60

image.png.bcb5db66516cc0e9e39072ec980396a2.png
You can check this article about the CONVERT function:
https://howto.caspio.com/function-reference/#:~:text=Miscellaneous Functions and Expressions

Link to comment
Share on other sites

  • 0
13 minutes ago, Tubby said:

I think the virtual field is being rendered as an integer which is causing the output to be rounded off to the nearest whole value.

Try this formula to convert the virtual field to a float/number data type first before the calculation:

CONVERT(FLOAT, [@cbParamVirtual1]) / 60

image.png.bcb5db66516cc0e9e39072ec980396a2.png
You can check this article about the CONVERT function:
https://howto.caspio.com/function-reference/#:~:text=Miscellaneous Functions and Expressions

BINGO! Thank you so very much. Domo Arigato. Danke sehr. Merci beaucoup. Gracias.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...