SmartRound in KNIME

Hello everyone,

I have to translate the SmartRound function (Returns (x) rounded to the nearest multiple of a value determined dynamically based on the size of (x).) from Alteryx to KNIME.

There is a node or a function to do it in KNIME ?

This is an example of the SmartRound result :

Number SmartRound Number
120 120
3652.41 3650
153465.65 152500
454.18 455
25999.66 26000
1603.18 1600
532.7 530
2395.63 2400
617.47 620
4156.64 4150
119.3 118.75
23.76 23.75
11.64 11.625
14894.1 15000
59899.84 60000
720.75 720
6849.33 6800
113402.54 113750
9040.17 9000
2913.88 2900
43187.23 43000
48708.68 48500
11706.11 11750
7348.49 7300
25764.76 26000
10207.59 10250
25989.92 26000
7495.21 7500
9715.67 9700
4756.24 4750
39479.44 39500
15.86 15.75
4000 4000
3462.62 3450
249.58 250
454.34 455
1048.55 1050
90000 90000
13939.02 14000
8399.42 8400
48 48
12123.03 12125
30000 30000
72228.74 72000
100 100
10000 10000
22000 22000
19846.19 19750
3709.95 3700
3217.42 3200

What’s the outcome you want to achieve? Looking at these results seems a bit crazy to me. Varying levels of precision and rounding are going to create some problems in your analysis (in my opinion).

3 Likes

I want to compare two column and if the value match with the SmartRound then it’s Ok else is Ko.

You can try the math formula:

round($COLUMN A$/1000,0)*1000

And try with 1000 or 100 or 10 and so on.

Cheers

Just looking at the example data… I think they multiple the values by 4, apply rounding to 4 significant digits, divide by 4 again. (Is “4” the smart part of it? Can this be customized in the Alteryx?)

I tried it and yields the same results, see this example (could wrap this into a component and share it with others?)

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.