Have you ever wondered why some fields in tableau are green and some are blue? Of course it has a meaning. This is all about discrete and continuous fields. First, we will start with continuous fields.
Continuous fields have values that can fall anywhere along an axis. This axis can contain an infinite number of values. For example, the temperature can be any number from absolute zero on up.And anywhere in between two integers. Discrete fields have values that can only fall into a specific bin or category, not between. For example, pet name would be a discrete field because the names of pets are distinct categories.
Have a look some examples of continuous fields :
- The height of a tree,
- Wind speed,
- Price of an item,
These will usually be treated as contiunous fields, by default tableau, in Tableau. When you use a continuous fields in a view, you can tell it’s continuous because Tableau turns the field green.
Now let’s look at some examples of discrete fields :
- Names of pets,
- Employee IDs
These will usually be treated as a discrete fields, by default, in Tableau. There is no continuum of values betwwen pet’s names. When you use a discrete field in a view, you can tell its discrete because tableau turns the fiedls blue.
Let’s look at how continuous and discrete fields affect the way tableau. visualizes your data. We will examine the data of Sample Store.
Above the viz, tells us the montly ship data and sales. How we can build this visualization;
- Ship date is discrete fields by default. So convert the ship data to continuous field
- Drag the ship date to columns. And expand it to monthly
- Drag the sales to rows, right click the fields , come to measure choose the count distinct
- Lastly, format the color and shape and congrats! it’s ready
These data visualization provide an insight about which month has the most sales. This is so simple, you should try on your own. Please don’t forget share your data viz in comment section.