grain Step Type Properties

Use the grain step type for a values table. Values tables have no groupings, just a list of dataset fields to display as columns in the table.

Field NameDescription
datasetsAn array of datasets used by this step. Specify the alias of each dataset. If the pigql attribute references a dataset that’s not specified here, the dashboard doesn’t render. A grain step can only have one dataset.
isFacetEnables this step to facet and be faceted by other steps. Faceting is when a selection in a widget filters other steps in the dashboard.
isGlobalThis applies to global filters created before Winter ‘18 only. Newer global filters, those created in the global filter panel widget, don’t require a step. Default is false. You can apply this property only on steps that are connected to a global filter widget—all other steps ignore this property. A global filter filters other steps in the dashboard that have useGlobal set to true and reference the same dataset.
labelStep label, which is primarily used for display in the dashboard designer user interface.
queryThe query used to retrieve results from a dataset. The query can be in compact form only.
typeStep type. Set to grain.
useGlobalIndicates whether to apply global filters to this step (true) or not (false).
visualizationParametersVisualization details about the step. For more information, see visualizationParameters Properties.

The query can contain the following properties:

  • filters — The filter conditions to apply to the data.
  • values — List of dataset fields to show as table columns.
  • limit — The maximum number of results that the step can return. When you create a grain step, by default, Analytics sets limit to 100. To return more results, set the limit attribute accordingly. The higher you increase the limit, the longer the query takes. When a limit isn’t set, CRM Analytics returns up to 10,000 results. Limit only impacts the number of records returned for display. The limit doesn’t impact calculations across all records in the dataset. For instance, a query groups by Account Name and there are one million Account Names in a dataset. When the limit is 20, CRM Analytics returns 20 records for display. But the summary row provides a total for the one million records.

Example query:

For more information SAQL queries, see the Analytics SAQL Developer Guide.