I have values that contain a decimal and I want to remove the decimal and the text after the decimal. I would prefer to use a formula vs parsing the text first because I only want it to apply to records that have Texas as a jurisdiction and where the description field contains the word credits. Is there anyway to do this as one formula vs filter the data, parsing and then unioning back together?
Solved! Go to Solution.
Ho @bsolove ,
you can use a formula:
Left([Field1], STRCSPN([Field1],'.'))
STRCSPN counts the number of characters to '.' (if there is no decimal separator, the length is returned). LEFT takes the characters left to '.'
If you want to apply the formula only to specific records, you can use an IF clause:
IF CONTAINS([Field2], 'Texas') THEN
Left([Field1], STRCSPN([Field1],'.'))
ELSE
[Field1]
ENDIF
Hope this is helpful
Best,
Roland
I think this formula should do it...
LEFT([Data],FindString([Data], "."))
Find the position of the . and then read from the left to that value.
hi @bsolove,
I found this way to solve it with the formula tool
Let me know what do you think
Best,
Vianney