Hi,
I am trying to create a custom filter that will remove all decimals and keep only whole numbers. I have tried the following formula based on a post I saw in the community but it keeps telling me that it is a malformed function call:
REGEX_Match([Sum_ENTERED_DR], \d+)
can someone please assist?
Thanks!
Solved! Go to Solution.
Hi @danchips24
Just quote your expression and you will be fine.
Also, make sure your field is considered as a String if it is not.
REGEX_Match(ToString([Sum_ENTERED_DR]), "\d+")
Cheers,
REGEX_Match([Sum_ENTERED_DR], "\d+")
Assuming that the sum_entered_dr field is a string.
Cheers,
Mark
Hi @danchips24
If your field is numeric, you can use this
floor([Field1])=[Field1]
Does the integer portion of the number = the number
Dan
@danchips24 You can also do the below in the filter tool.
!Contains(tostring([Field1]), '.')
Keeping it simple 🙂
Last but not least.
Good option - IsInteger function.
IsInteger([Field]) on Filter tool.
Cheers,
IsInteger() - Built in Alteryx function. Definitely the best option!
Another hidden gem in the Test group of functions is
CompareEpsilon(a,b,epsilon) Used to compensate for the inaccuracies introduced with trying to represent base 10 decimals in Base 2
Dan
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |