Usage
dimension: field_name {
label_from_parameter: parameter_name
}
}
Hierarchylabel_from_parameter |
Possible Field TypesDimension, MeasureAcceptsAparameter name |
Definition
The label_from_parameter
parameter lets you change how a field name appears in a visualization, based on the value of a parameter
.
In the following example we create a parameter called item_to_add_up
that lets a user choose the database column to sum. A corresponding measure called dynamic_sum
performs the calculation, and it takes on the name of the parameter value because we’ve used label_from_parameter: item_to_add_up
In Looker the appearance would be: