Field Data Types

From Explore Analytics: The Wiki
Revision as of 07:52, 3 March 2016 by Gadiyedwab (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

A table field has one of the following types:

  • text
  • datetime
  • decimal
  • integer
  • reference
  • choice
  • duration

Having the correct type is crucial for many capabilities of Explore Analytics.

Reviewing and Changing the Type

The field type is automatically determined and in most cases requires no adjustment.

Uploading or Importing Data

When you upload a data file or import a Google spreadsheet, the data type is automatically classified into text, datetime, decimal, or integer. The automatic classification is often accurate, but not always. It is advisable to select the option to "Review and make changes".

Upload fields review.png

There are two steps for the review. The first has to do with the delimiter. The second step in the review will show you the fields and their detected type and allow you to make changes.

Upload fields.png

Reviewing and Changing Field Type After the Table is Defined

Whether the table is in an external data source (database or application) or in the "explore" data source (uploaded or imported), you can review the fields and make changes.

To review the fields, see Listing Table Fields. You'll see a list of fields as shown below.

List of fields.png

To make a change, click on a field (e.g., COMMISSION_PCT in the picture above) and select "Edit this field" from the context menu.

Edit field.png

In this dialog, you can change the type of the field.

Text

A text field can hold any text. It typically receives no special formatting. Although it's useful for storing any type of data, it's better to choose the appropriate type if a more specific type fits the data.

datetime

A datetime field is very useful. It can be used in charts to create a timeline and in pivot to aggregate data by period such as year, month, or week. When displaying dates in lists, you can control the date format by setting the default date format in global settings (you can edit the global settings by selecting the "Global settings" option from the "Admin" menu).

Decimal

A decimal field can be used in calculations and display currency (money) values.

Integer

An integer field can be used in calculations and display numbers without a fraction.

Reference

A reference field is crucial for selecting fields from related tables. This type of field is covered in great details in Reference Fields.

Choice

This is a special type of text. A choice field has a limited set of choices and each choice can have a label (a display value). Choice fields are useful in several cases:

  • When filtering data. A condition value can be selected from a predefined list of choices
  • In pivot and chart categories. The label can be adjusted to control the display of the field's value. For example, instead of "y" and "n" you can display "Yes" and "No"
  • In pivot columns. You can use choose how to order the categories defined by this field (by the numeric order, value, or label)

You can do all that by selecting "Edit Choices" from the field dialog that you saw before.

Edit choices.png

When you select edit choices, you'll see the following dialog. (The data shown in the dialog is an example)

Edit choices dialog.png

Using this dialog, you can edit the labels for the choices and you can control the sorting of the values in pivot.

You can convert any text field to a Choice field when there's a limited list of possible values to choose from.

Duration

A duration field is an integer field that holds the (positive) number of seconds elapsed. When displayed, this field will be formatted to show a value such as "1 day 03:12:00" for one day, three hours, and 12 minutes. It will sort correctly and can be used in calculations.