General Discussions

Discuss any topics that are not product-specific here.

Decimal Values and Data Types

goatley1
7 - Meteor

In Alteryx, we have 3 choices for data type to deal with decimal values.  Float, Double, and Fixed Decimal.  The online materials I've found discuss some comparisons between Double and Float.  Namely that Double takes 2x the space as a Float.  Fixed Decimal is the most precise?  

 

I'm mostly concerned about space and since I mostly use financial data and don't need more than 2 decimals of precision, so it would seem that Float is the best option. 

 

What are the benefits of the 3 types other than stated above, when do you use them, and why?

 

Thoughts?  

1 REPLY 1
caltang
17 - Castor
17 - Castor

I created this slide based on information from the Alteryx website / knowledge hub for sharing:

 

image.png

 

To your question, I would say Double is the most precise in terms fo decimal places. It will be helpful to maintain the data type as Double until the very end, then decide to change the data type to Fixed Decimal so you maintain a high level of accuracy until the end. 

 

In terms of space, I don't really notice much difference honestly and with AMP, most of the heavy lifting is done already and the workflow itself is not huge in size. Of course, this depends on your personal specs so I cannot say that my experience is the same as yours.

 

There is a good article here detailing Double vs Float: https://www.freecodecamp.org/news/double-vs-float-in-cpp-the-difference-between-floats-and-doubles/#.... and the concept applies also to the Alteryx Engine.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels