Depending on the data source and connection, Tableau tries to determine the field data type. Most often, the field data types are identified correctly; sometimes, however, changing data types becomes necessary.
We will use the sample superstore sales saved data source for this exercise. Open a new worksheet and connect to the Sample – Superstore Sales (Excel) data source.
Once the sample file is loaded on the worksheet, perform the following steps to convert data types:
Since the data type and role of a field (dimension or measure) determines how the data will be used in the visualizations, it is critical to have the right data type for fields in the data. You will notice that, if you convert a field in the Measures pane to a Date type, that field will be moved to Dimensions. If a field from the Dimensions pane is converted to Number, it will stay in the Dimensions pane. If a field from the Measures pane is converted to String, the default aggregation changes to Count.