Rounding Calculations in Tableau (and Excel and Alteryx)

Introduction – This Is My First Reblog

I have never reblogged someone else’s work. However, when someone writes a treatise on a topic like this, I have to capture the information because I know I will need it in the future. This is a Master’s thesis delivered in the form of a blog post and this work comes directly from James Dunkerley. In this case, imitation is the sincerest form of flattery.

Believe me when I tell you that you feel like you are on a merry-go-round when you are studying rounding. Your brain is saying, “around and around we go, where we stop, nobody knows”. Even Mr. Ned of Alteryx got sucked into the vortex one day when sent him an innocent question about rounding! I still feel bad for wasting part of his day, although he said he liked the punishment!

merry

So now we have a place to go to get the correct formulations for rounding for our applications. I consider this to be the definitive guide for rounding when you are working in Tableau and Alteryx. I can only imagine how long this took James to write, but I’m sure glad that he did it rather than me. Thanks so much for sharing this work, my friend. – Ken 7/29/15.

James Dunkerley's Blog

image

I was doing some table calculations in Tableau and needed complete control over the rounding that was used. Tableau provides a single ROUND function. The exact specification of this (I believe) depends on the data source you are connected too, as it passes through to the underlying server. I needed to be able to look at the effect of the different methods for rounding so had to create some functions reproducing the different rounding methodologies.

Ken Black (@3danim8) has a great post on rounding and all the wonderful quirks of the different way here.

image

There are far too many options for dealing with rounding. Different ways to handle numbers at exactly 0.5: to round up (the one we are all taught), to round down, to round away from 0, to round towards 0, or banker’s rounding (rounding to the nearest even number). There are also some simpler rounding methods (e.g. Round…

View original post 1,042 more words

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s