Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Round formula

Selrac
6 - Meteoroid

I'm a bit puzzled with the 'Round' formula

 

I'm used to 

Round ( expression, [decimal_places] )

But I see that in Alteryx is

Round ( x, mult ) - Returns x rounded to nearest multiple of the number specified in mult. 
 

What formula do we use to show a round to two decimal places (for example)?

 

I fail to understand how Round(x,mult) exactly work.

 

 

 

 

 

 

5 REPLIES 5
Selrac
6 - Meteoroid

Somehow the image didn't load in the previous post. Find it below

Mult.jpg

markcurry
12 - Quasar

Hi @Selrac to round to two decimal places, use the following formula:

Round([Spend]/[Visits],0.01)

 

Hope that helps.

Selrac
6 - Meteoroid

Thanks @markcurry 

 

I understand the relationship now. In case it helps someone, I've added example below comparing Round VBA or Excel formula with Round Alteryx 

Selrac_0-1599083947491.png

 

Wamiru
7 - Meteor

Thanks a lot @Selrac @markcurry 

luckfreeman
8 - Asteroid

Think about a list of numbers with multiple, you can get two numbers which the target number falls in.

Take a example,  the number is 55.34, the formula is "Round([Value], 2)".

With multiple 2, you can have 54 and 56, which 55.34 falls in this range.

Then think about which one is near 55.34? Obviousely, it is 56.

 

If you change the formula to "Round([Value], 1)", then the 2 numbers will be 55 and 56.

Which one is nearer to 55.34 this time? It is 55.

 

Hope it can help to understand the formula.

Labels