death.crafter wrote: ↑November 13th, 2021, 7:30 pmHii Yinco... Been a long time. Hope your teeth are shining like diamonds
Well, they're shining alright, but the bad tooth is still there, LOL - been postponing the removal as I had other things to solve first.
death.crafter wrote: ↑November 13th, 2021, 7:30 pmAnyway, why try to use substitute tho? You could just directly use Round in the formula, couldn't you?
Brian wrote: ↑November 13th, 2021, 7:31 pm
One solution could be to use another Calc measure specifically for "string" values. [...] Note, the string measure needs to be placed after the number measure. String1 uses section variables, thus needing DV=1. String2 doesn't need DV=1. Neither need Substitute.
Yep, I know I could do it the ways you described.
The reason I wouldn't prefer to do it those ways is that I want to have BOTH the fractional value (so I can easily verify the computation result in the log) AND the rounded value (so I can display it nicely in the meter) ... in the same measure. Something like a FreeDiskSpace, a Time or a UsageMonitor measure, only with (fractional vs integer) numbers involved.
My scenario is one where what comes after the decimal point is critical to make sure I do the calculation right (it involves the declination of the Sun, the Greenwich hour angle and the equation of time, not to mention computing perihelion and december solstice day of year, LOL), but at the same time I only use or display integer values (basically, angles between 0 and 359) visually. I already have a couple of measures computing stuff and I want to minimize their number as much as possible to keep things relatively simple, hence my desire to have it in a single measure. Last, but not the least, at first view it seemed like something that could actually be done using such a regex substitute, until Brian's explanation that is.
Bottom line, I guess it's just about trying to keep things compact.