Using the Fields Tab


The fields in your data source are available from the Fields tab. By default, if the data source uses folders to organize the fields that it contains, these folders are reflected in the Fields tab. This folder organization is called a business view. For dimension fields, these folders could be field hierarchies defined in the data source or segments in the data based on different tables that have been joined together. Measures can also be grouped based on segments.

Icons identify whether a folder is a basic folder or a hierarchy , and whether a field is a character , geography , date , or numeric field. Calculated fields are indicated by a function symbol added to the field icon.

By default, the Fields tab is divided into two sections, one for dimension fields and one for measure fields.

Dimension fields are categories that sort and organize the values in your data. For example, product categories, customer names, geographic locations, and dates are all commonly used as dimensions. In a chart, each value in a dimension field often defines a separate section of the chart. For example, each dimension value might be represented by a riser in a bar chart, a slice in a pie chart, or a point in a scatter plot.

Dimension fields in your data source can be organized into hierarchies, where the top field is the most general and the bottom field is the most specific. The following image shows a hierarchy of product fields.

Note: Hierarchies in cube data sources do not include a Values list in WebFOCUS Designer.

Some dimension fields can also be expanded to show attributes. Attributes are other fields that provide additional information about field values. Each attribute field value is correlated to a value of the field that it describes. For example, in the following image, the attribute fields for the Customer City field, listed in the Customer,City Details folder, provide information such as the latitude, longitude, and population of each city value.

Attributes for Customer City

Measure fields supply quantitative values for each category defined in the chart, often sizing components of a chart or applying a color scale to reflect those values. Measure values are typically numeric fields.

To add a field to a chart, drag it from the Data pane into a bucket or onto the chart canvas. Different buckets are configured to use different kinds of fields. For example, in a bar chart, the first field added to the Vertical bucket is used as a measure to aggregate the sort values in the chart. Therefore, you will typically use a measure field in this bucket. Similarly, you will typically use a dimension field in the Horizontal bucket for a bar chart in order to determine the values that each bar represents. If you use a measure field in the Horizontal bucket using the Add as dimensions option, a bar will be generated for each value in the measure field.

If a bucket is designed to use only measure fields or only dimension fields, you cannot drag a field into it from the Fields tab. To indicate this, the cursor changes to a cancel sign when pointing to an invalid bucket. For example, when creating a vertical bar chart, you cannot drop a measure field into the Horizontal bucket, or a dimension field into the size bucket. If you drop a dimension field into the Vertical bucket, instead of aggregating the report like a measure field in the Vertical bucket would, matrix rows are created for each value in the dimension field. 

Instead, to add a measure field to a dimension bucket, right-click the field in the Fields tab and click Add as dimension.  The field is added to the default dimension bucket, and appears in blue, indicating that it is a dimension, as shown in the following image.

You can then move the field into another bucket that accepts dimension fields.

Similarly, to use a dimension field as a measure, right-click it and click Add as measure. The field is converted to a measure by applying the CNT. aggregation function, which provides a count of data records, and it is added to the default measure bucket. The field appears in green, indicating that it is a measure, as shown in the following image.

You can then move the field into another bucket that accepts measure fields.

You can right-click the field in the measure bucket and point to Aggregate to change the prefix operator aggregation from count (CNT.) to count distinct (CNT.DST.), which provides the number of distinct values for the field, or percent of count (PCT.CNT.), which computes percentages based on the number of instances found.

Some buckets accept measure fields and dimension fields, but use different types of fields differently. For example, if you add a measure field to the Color bucket for a bar chart, a color scale is generated, and each bar is colored according to that scale. If you add a dimension field to the color bucket, a legend is created. The bars are each segmented into different colored sections based on the legend.

You can add fields to other areas, as well. If you drag a field to the Filter toolbar, you can create a filter for the field. If the field is a character field, you can select values from a list. If the field is a numeric field, you can use a slider to specify filter values. If the field is a date field, you can use a calendar to select dates or use a predefined date range.

If you drag a field into the chart header or footer, the field is used as a parameter to dynamically provide a value in the header or footer text. The first value found for the field is displayed at run time. Using a field in the header or footer is especially useful if that field is also used to filter the chart or if it is used as a multipage field. The following image shows WebFOCUS Designer with the Customer Country field added to the header of a chart that is filtered to only show data for the United States.

Design view of field in chart header

The following image shows the chart at run time. The chart header displays United States, which is the value of the Customer Country parameter.

Run time view of a chart with a field in the header

You can manipulate fields from the Fields tab as well. You can right-click a field to add it to the chart, create a filter for it, or create a define using the selected field. If you right-click a dimension field, you can add it to the chart as a measure. When you do this, an aggregation function that calculates a count of the dimension values is applied to the Dimension, and the field is placed in the bucket.

Similarly, you can right-click a measure field and add it as a dimension. In this case, the measure value in each row of the data source is used as a sort value in the chart. You can also right-click a measure and point to Bin values to create bins. Bins are ranges of values that you can use to sort the chart. For example, bins are used in histograms to plot the distribution of data values.

You can right-click a measure or dimension once they are added to the chart to access additional options. For example, if you right-click a dimension added to a chart, you can change the location of the axis, the sort order, create a compute, and more, as shown in the following image.

If you right-click a measure added to a chart, you can set it to use a logarithmic scale, set sorting, apply an aggregation function, use a quick transform, create a compute, and more, as shown in the following image.

In the Fields tab of the Data pane, you can also create a calculation that runs before aggregation (DEFINE) by clicking the ellipsis buttons on the top right of the Dimensions and Measures panes, and clicking New calculation, as shown in the following image.

Dimension menu