In most cases, data can be divided into dimensions and measures, but this division may not always fit according to your visualization requirements. In such cases, you can define and manipulate the dataset by converting Dimensions into Measures, and vice versa. In Arcadia, you can toggle between Dimensions and Measures.
When you convert a dimension into a measure, a string is converted into an integer with the default aggregation function Sum. You can change that to Count or Average and so on. Learn more about aggregate functions here.
In this example, you’ll be working with the dataset
Employee_Salary_2014 [Data source]. The dataset shows employee salaries in Montgomery County, Maryland, in the year 2014. Because the data is originally in a CSV file, and the CSV format takes all values as strings, the imported dataset shows only dimensions and no measures. This article demonstrates how to convert dimensions into measures, and then change their default aggregate function from Sum to Count.
You must have access to the dataset that uses
Employee_Salary_2014 data. Follow the guidelines in these articles:
In this exercise, you learn how to:
- Manage dataset field attributes
- Expand and collapse field attributes
- Convert Dimensions into Measures
Manage field attributes
- Find and open the specific dataset that uses
- In the left side navigation menu, click Attributes.
Attributes view appears, and shows the Dimensions and Measures lists.
- If the lists are collapsed, click Expand All at the top of the Measures list.
- Click Edit Attributes at the top of the Dimensions field.
- The Dimensions and Measures lists appear, with editable fields highlighted in blue.
- Convert Dimensions into Measures by clicking Dim to the the left of the field name in these three rows:
The fields now show as Mes (measures).
- Click Save.
- Note that the converted fields appear under the Measures list.
- To change the default aggregate measure function from Sum to Count, click Edit Attributes.
- Under the Measures list, click
The Column View appears.
- In the Column View, the Default Aggregation shows Sum.
- Click the drop-down icon next to Sum.
- In the drop-down list, click Count.
Alternatively, you can change aggregate functions by manually entering an expression in the Enter/Edit Expression modal.