I have an expression to calculate distance and convert to miles loaded in a virtual column. It takes the LATLONG of our office and the LATLONG of the address of whatever clinic is selected (done currently using an AwesomeSheet addon โน๏ธ ) and sticks it in a virtual column. The expression is currently:
CONCATENATE(((DISTANCE([TKE Jackson],LATLONG([Latitude],[Longitude])))*0.621371),"mi")
How do I go about converting this so that it never displays more than two places past the decimal?
I initially thought about using LEFT() but that would yield slightly unpredictable results.
Solved! Go to Solution.
At first glance, seems like TEXT() should be enough:
CONCATENATE(
TEXT(
DISTANCE(
[TKE Jackson],
LATLONG(
[Latitude],
[Longitude]
)
)*0.621371
),
"mi"
)
A combination of LEFT()+RIGHT() should be the solution.
Can you explain the column type of each of the columns on the expression?
Sure!
[TKE Jackson] is a a LatLog type,
[Latitude] and [Longitude] are both Decimal type
At first glance, seems like TEXT() should be enough:
CONCATENATE(
TEXT(
DISTANCE(
[TKE Jackson],
LATLONG(
[Latitude],
[Longitude]
)
)*0.621371
),
"mi"
)
That works but i don't understand how ๐ค
Does TEXT() automatically truncate to two decimal places?
perfect, thank you so much!
User | Count |
---|---|
27 | |
26 | |
25 | |
23 | |
15 |