Can somebody explain how Compare Digits works?
The example above returns True. I would have thought that comparing 1.1 to one significant figure and 2 to one significant figure would give 1 == 2 (i.e. a False). What am I missing?
Solved! Go to Solution.
I saw this post.
https://community.alteryx.com/t5/Alteryx-Server-Discussions/CompareDigits/td-p/375178
And i tried your same example. Yes you are right i was expecting False but got True.
Really strange 🤔
@atcodedog05 Ok, thanks for the link. Think I understand it now.
It doesn't round, but finds the difference after those significant figures. So CompareDigits(12345, 12444, 3) would be 12,300 and 12,400 (to 3 s.f.) which don't match, but because the difference is less than a hundred (the amount of the third significant figure), it gets returned as True. A more succinct way of describing it is "are the values within x significant figures of one another". Confusing, but kinda makes sense... :S
Great explanation now i kind of understand. I thought it was kind of string compare.
But i kind of understand how and powerful this is 🙂😎
Thanks again for this great new exposure😀
I never knew this existed 😅