The label_from_parameter parameter lets you change how a field name appears in a visualization, based on the value of a parameter.
The field name remains unchanged in the data table and the field picker.
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.
When the parameter value Total Sale Price is selected, the dynamic_sum field will appear as Total Sale Price in the visualization. The field will still appear as Dynamic Sum in the data table and the field picker.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# label_from_parameter\n\n\u003cbr /\u003e\n\nUsage\n-----\n\n```\nview: view_name {\n dimension: field_name {\n label_from_parameter: parameter_name\n }\n}\n```\n\nDefinition\n----------\n\nThe `label_from_parameter` parameter lets you change how a field name appears in a visualization, based on the value of a [`parameter`](/looker/docs/2512/reference/param-field-parameter).\n\nThe field name remains unchanged in the data table and the field picker.\n\nIn 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`. \n\n parameter: item_to_add_up {\n type: unquoted\n allowed_value: {\n label: \"Total Sale Price\"\n value: \"sale_price\"\n }\n allowed_value: {\n label: \"Total Cost\"\n value: \"cost\"\n }\n allowed_value: {\n label: \"Total Profit\"\n value: \"profit\"\n }\n }\n\n measure: dynamic_sum {\n type: sum\n sql: ${TABLE}.{% parameter item_to_add_up %} ;;\n label_from_parameter: item_to_add_up\n value_format_name: \"usd\"\n }\n\nWhen the parameter value `Total Sale Price` is selected, the `dynamic_sum` field will appear as `Total Sale Price` in the visualization. The field will still appear as `Dynamic Sum` in the data table and the field picker."]]