Creates a Level of Detail field, which controls the granularity at which an aggregation is computed.
This parameter is useful for creating metrics that remain consistent across different groupings, such as customer-level totals or category-level averages. LoD fields are dimensionalized, enabling you to perform an additional layer of aggregation - e.g. average customer lifetime spend.
You can also create LoD fields in the workbook! In the field browser of a query tab, click the on a dimension and then Modeling > New level of detail field.
The grouping strategy and the field to use to apply it, specified as grouping_strategy: [ field_name ]. Refer to the Examples section to see an example with complete syntax.The grouping strategy must be one of the following:
always_include - Adds specified dimensions to the query’s grouping, forcing a finer level of detail
always_exclude - Removes specified dimensions from the grouping, producing a coarser aggregation
fixed - Defines an absolute level of detail, replacing all query groupings