New computed column: Math

The Math column is added via the Data Editor view, on the left panel of the builder. Once added, you can use it with your component(s).

I added the Math column via Data Editor, and the result is already shown in the Data, but I cannot find that Math Column in the component list when designing my input form.

When you add a text component, the math column isn’t in the list of columns to select from? Are you looking for some sort of component that doesn’t exist?

Yes, I think. The math column is not a UI component, it’s just a column where data is stored.

The values contained in the Math column can then be displayed in your app using the most part of the component : basic text, rich text, choice, and so on…

Math column : to store data.
Components : to display data from column, math and all others from Glide and Gsheet

2 Likes

Yeah, here’s some screenshots…

Created the maths column:

CleanShot 2020-01-18 at 13.56.04

Using the maths column

CleanShot 2020-01-18 at 13.57.39

1 Like

Thanks, I found it under Text (Basic Text/Rich Text) section (previously looking for it under Edit Component).
The problem now is: value is display without thousand separator (the basic text has label, but no separator, the rich text has separator, but no label :frowning:)

Unfortunately there isn’t a lot of control over the formatting of a math column. I would like the ability to round the number to a certain number of decimals. Interestingly, I don’t see a thousand separator with either the basic text or the rich text component.

1 Like

I hope that formatting Math Column is near the top of Glide’s todo list.

3 Likes

@Mark I could not find the answer how to achieve date calculations like I have date of Birth column need to store Age using today or Datediff formula of sheet, how can I achieve in calculated column.
Also, while entering date of birth I want to show his Age on the screen, how to achieve that. Want to show some msg with age.
Thanks in advance
Mrinal Chakraborty
India

I don’t think the glide math column can haven’t dates. You’ll have to use a formula in the sheet.

1 Like

Thanks for your prompt reply.
Can I get answer of my next point. Is there any work around to calculate in addition screen before pressing submit button.

There isn’t…I wish there was, though. It would be helpful. Since nothing is written to the sheet, yet, calculations can’t be made. I’ve managed to do calculations with dates when using the TIMEVALUE() formula. Converts to a number and then you can perform calculations with the number. There’s still a lag though, as the formulas have to calculate before they’re visible in the app.

@Mark, can you add “VALUE” as an option for date formatting in addition to short, medium, and long? (or just allow calculations of dates and times?)

2 Likes

I hope all that formula working in Sheet. I am using the same in sheet using Array formula.

@Robert_Petitto Formatting is superficial - it wouldn’t let you do calculations. For example, if you format a number without decimal digits (i.e. to show it rounded to a whole number) and then use the number if a Math column, it will still use the original number’s full precision.

We are aware of the need to calculate with date/times, and we’re thinking about the right ways to do that.

5 Likes

@Mark Makes total sense. Thanks for the reply!

Thanks

Nice addition. Is there a way of using this to calculate the duration between a date column and today?
Eg If I wanted to show the elapsed time (hours) between a task due date and now.
I know how to do this in Sheets but can’t see how to do this using the Calc function.
Thanks

I know it. Not at this time. I have several apps that would benefit from being able to calculate date/time columns in Glide. Adding durations, calculating duration, etc. Doesn’t exist yet. I put in a feature request in https://features.staging.glideapp.io/, but it hasn’t been approved yet. Keep hoping i guess!

2 Likes

@Karim
I just tried your app convertit.glideapp.io. Thank you.

Your calculator is blistering fast. I created a little creator in an app and it takes 8 seconds to display the result of the calculation.

Did you encounter similar delays when setting up your calculator?

@Robert_Petitto
Calculations on date and time might be done in your spreadsheet. Are you not not offering the features to your users because you want to avoid calculations in the spreadsheet?