Support Forums
Adding a comma before last digit

I've got a tag numeric value that I need to add a comma before the last digit.

For example, 837 would need to be formatted as 83,7. The value 49837 would be 4,983,7. The value 7 would just be 7. This is how the customer wants to see the values on the screen. I know this will have to be formatted as a string but not sure how to go about it.

The CommaFormat looks to only add a comma per thousand and if I had the digits all separate, I could use the concat to add in commas, but I really prefer to not break down each digit of the numeric values b/c there are a LOT.

I've got a tag numeric value that I need to add a comma before the last digit. For example, 837 would need to be formatted as 83,7. The value 49837 would be 4,983,7. The value 7 would just be 7. This is how the customer wants to see the values on the screen. I know this will have to be formatted as a string but not sure how to go about it. The CommaFormat looks to only add a comma per thousand and if I had the digits all separate, I could use the concat to add in commas, but I really prefer to not break down each digit of the numeric values b/c there are a LOT.

This will return a string only so it wont be able to trend like an analog, but here you go.

concat(SubStr([..], 0, (StrLen([..]) - 1)), ",", SubStr([..], (StrLen([..]) - 1)))

This will return a string only so it wont be able to trend like an analog, but here you go. concat(SubStr([..], 0, (StrLen([..]) - 1)), ",", SubStr([..], (StrLen([..]) - 1)))
edited May 7 at 5:57 pm
32
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft