🧮 New Math functions

Try this:

500*ROUND(X/500)

4 Likes

Hi Glide Team, I agree with @wjcv06 and would also like LEFT, RIGHT and SUBTRING functions ?
In my case, need to find a workaround to show differents time periods for charts with https://quickchart.io/ : data presented as in a stringt list with coma separations !

Screenshot 2020-10-18 at 19.00.22|245x500

1 Like

how about a ternary operator like
predfact=medfact * (sex='F" ? 1.018 : 1.000)

although i would rather have it as
predact=medfact * (if sex=‘F’ then 1.018 else 1.000)
or
predfact=medfact*(if sex=‘F’ then lookupF(age) else lookupM(age))

ie. the values returned by the conditional statement are inline values or variables, or values of functions or other math expressions

1 Like

it works well, thanks!

2 Likes

Waiting for countifs and average if for automate counting survey result… :smiley:

Jeff - I thought this syntax could work for rounding (always) up the current time to nearest 0:30 min using ceiling function. First, tried X as a now math column. Then tried incorporating now within the formula. I’m stumped. Any insight?

is it possible to round up to exact places after the dot?
something like from 1.423 to 1.43

@administrasi_kitsda Have you looked into using relation, rollup, and math columns to get counts and averages?

@Rasha I spent some time last night trying to come up with a math formula to do that. I feel like I’m close, but I don’t know yet if it’s possible.

@A.I.Office I don’t think you can specify number of decimals, but if you take your value, multiply by 100, Perform a Ceiling on that result, then divide by 100. Should look something like CEILING(X*100)/100

4 Likes

i’ll try that, thanks :slight_smile:

1 Like

Appreciate the time you spent on this @Jeff_Hager. I can live without for the time being.

@Rasha I think I got it. I feel pretty good about this one. This formula will calculate the time to the next half hour. It does float between 0 and 1 seconds after the minute, but appears to stick on the exact minute of the next half hour and switching to not show seconds will give you a good view. I did watch the time switch from 5:59 to 6:00 and after that, the value changed from 6:00 to 6:30, so I feel pretty good about it.

The kicker here is that this will require a seed date. This will need to be a column with a date/time. The date and hour can be anything, but the minutes and seconds need to be on the hour, so equal to 0. For example, this is what I have as a seed date/time.
image

This is the complete math formula:

X+
(
CEILING(((X-Seed)-ROUND(X-Seed))/.0208333)
-
FLOOR(((X-Seed)-ROUND(X-Seed))/.0208333*1000)/1000
)
/48

Hope it works for you.

Edit: This may be better and just a hair more accurate. Basically the same either way.

X+
(
CEILING(((X-Seed)-ROUND(X-Seed))*48)
-
FLOOR(((X-Seed)-ROUND(X-Seed))*48*1000)/1000
)
/48
5 Likes

@Jeff_Hager your help on this one is invaluable - a million thanks! I think the seed column won’t present an obstacle to flow - we’ll see. Will work through this in the coming days and share where I end up.

1 Like