New computed column: Math

@erwblo I’m sure you figured this out already, but the math column is like the template column. You give it placeholder text in the formula, then assign columns to each placeholder.

I didn’t know spaces weren’t allowed, I removed the spaces, now it works!

I was thinking about supporting spaces in names. Maybe I should revisit the decision not to.

2 Likes

Or maybe some helper text that describes what to type. (Value1 * Value2 + Value3)

The placeholder in the input field does have a helper text :wink:

Maybe a rounding formula?

What’s your specific use case?

I made the following:
convertit.glideapp.io

As you will see the conversions show up to 16 decimals, which is not ideal. Similar apps usually show 4 decimals
Screenshot_20191116-005652|236x500

Also in the example you posted as a GIF, a price per piece is calculated with up to with 16 decimals (in my experience prices were usually calculated with up to 4 decimals).

Maybe allowing us to input a rounding formula for better UX in the math column could be a solution?

Thanks!

Ah, I see. That seems more a problem of number formatting than of rounding, though.

1 Like

Sorry, yes you are right.
If I am not mistaken, at the moment we cannot influence the formatting of the output of a computed column (math in this case)?
(The result of the currency conversion in my app example is computed by a math column).

The output of the Math column is just a number, without a format. The number is formatted wherever it’s displayed in the app, and that’s where this oddity happens. Formatting number is not a trivial issue.

1 Like

Hi Mark, thanks for your awesome new feature.
Is there any posibility to make calculate App that everybody can use to?

Just like we make calculators app, that every user can calculate not depend on just single value.

So if, I make calculate App like @Karim app convertit.glideapp.io, I need the value that insert is different from another user. In that apps, If Karim fill ‘200’, than when I come to that App, the value still ‘200’. I need when every user come it’s blank.

Maybe it possible if I use per user data, but it’s just limited for 500 does/user, of I use pro app it’s limited for 25.000 row. but when the user come back, the value still the last value that user fill.

How?

There’s no good way to do this currently, but we’ll have something eventually.

If you have to rely on the spreadsheet to get the result and format it into a text column it sort of defeats the benefit of an instant calculation by creating the Math column. You could just do the math in the spreadsheet and format it. The time lag of displaying the final formatted result would be the same whether you do the math in Glide or in the spreadsheet. I think you need to add the formatting of numbers into Glide and might as well do it for dates too. This could be part of a comprehensive solution to the number and date formats for the different countries.

1 Like

Ah yes :sweat_smile:.
I guess using such a great no-code tool like Glide tends to make you underestimate the challenges of building it with code!
Thanks again for all the efforts you and the team are putting into improving glide for all of us :raised_hands:

Hello, this is my first comment on this forum although I’ve noted tons of features which would be cool to implement and am excited to see this math column, as the arrayformula took too long to populate in the app… About 2 minutes!

Now, one of the major formulas I use depends on log10(x), or even ln(x) but I can’t figure out how to make this column understand these. Does this also mean other algorithms, sin(), cos(), tan(), etc. are unavailable? Is there a way to write this properly? Thank you!

1 Like

We will add more functionality to the Math column over time, as we see how people use it. May I ask what your use case for the logarithm is?

2 Likes

When calculating your body fat percentage via the U.S. Navy formula; it’s relatively accurate and records over time can significantly help my gym members understand their progress over the weeks.

For men, the following formula: % body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76
For women, the following formula: % body fat = 163.205 x log10(waist + hip - neck) - 97.684 x log10(height) - 78.387

2 Likes

Just an FYI for our metric friends, the abdomen, neck, waist, hip measurements are in inches when using this formula.

1 Like

For the beauty of it, is there anywhere (post, app, etc.) I can find the “how we did it before”? =)