Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

How to remove trailing zeros

Hi All,

I have field A, which has values 1 & 0. We get data every month end. But for this month we got the values with trailing numbers (i.e. 1.00000000000000000000 and 0.000000000000000000).

Can anyone please help me in removing the trailing zeros?

Thanks in advance!

Cheers,

VK

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

SubField(A, '.',1)  as  NewA

View solution in original post

8 Replies
tresesco
MVP
MVP

Try like:

SubField(A, '.',1)  as  NewA

sunny_talwar

How about


Num(A, '##')

or

Num(A, '##.')

Anil_Babu_Samineni

May be this?

SubField(FieldName, '.', 1)

Or

FieldName * 1

Or

FieldName * Avg(1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
varunreddy
Creator III
Creator III
Author

Hi Sunny,

Thanks for the response. But I don't see any value associated to that date. I see '-'.

sunny_talwar

I don't see any value associated to that date. I see '-'.

To what date?

varunreddy
Creator III
Creator III
Author

As I mentioned, every month we get the data. The values will be 0 and 1. But for this month I got trailing zeros (i.e. 1.00000000000000000 and 0.00000000000000000).

When I created the list box for field "A", I see 0 and 1.

Now I selected the date 2/28/2017, then I see the association for the field A (i.e. 0 and 1 with White background in the list box).

Now I selected the date 3/30/2017, then I see no association for the field A (i.e. 0 and 1 with Grey background in the list box).

This is after using Num(A, '##').

varunreddy
Creator III
Creator III
Author

Hi All,

Thanks for the quick response.

Cheers,

VK

stigchel
Partner - Master
Partner - Master

Maybe A is a string and /or your decimal separator is different and you need to use the Num# function? i.e.

num(num#( A, '#.#', '.' , ','),'##')