Need a special offer?Find out if your project fits.
+
All documentation
  • API Reference for older versions
  • FieldObject

    This object describes a field selected for rows, columns, or report filters in the slice.

    Properties

    {
      uniqueName: string,
      caption: string,
      dimensionName: string,
      filter: FilterObject,
      levelName: string,
      showTotals: boolean,
      sort: string,
      sortOrder: string[]
    }
    Property/TypeDescription
    uniqueName
    String
    The field's unique name.
    caption
    String
    optional The field's caption.
    dimensionName
    String
    optional The dimension name.
    filter
    FilterObject
    optional Contains filtering information.
    levelName
    String
    optional If the field is a multilevel hierarchy, the levelName allows setting a specific hierarchy level to be shown on the grid or chart (see live demo).
    This property does not apply to report filters.
    showTotals
    Boolean
    optional Defines whether totals are shown or hidden for the field. When set to true, totals are shown. Only for the classic (tabular) form.
    If showTotals is not specified, totals' visibility is defined by the options.showTotals property.
    To show and hide totals via UI, use the context menu. Open it by right-clicking the field header.
    This property does not apply to report filters.
    sort
    String
    optional The sorting type for members: "asc", "desc" or "unsorted".
    sortOrder
    String[]
    optional Sets custom ordering for field members. The sortOrder can be specified like this: ["member_1", "member_2", etc.].
    Only for "csv" and "json" data source types.

    Example

    Example with the FieldObject in rows and columns:

    slice: {
      rows: [
        {
          uniqueName: "Country",
          filter: {
            exclude: ["country.[australia]"],
          },
        },
        {
          uniqueName: "Status",
          sort: "desc",
        },
      ],
      columns: [
        {
          uniqueName: "Order Date",
        },
        {
          uniqueName: "[Measures]",
        },
      ],
      // Other slice properties
    }