View the original community article here
Last Tested: Jan 21, 2019
Parameter fields allow you to inject values from a UI filter.
There is a docs page on Parameters as well as a docs tutorial for using parameters (which includes a guide for choosing between parameters and templated filters).
Example:
view: view_name { parameter: field_name { ... } }
parameter: item_to_add_up { type: unquoted allowed_value: { label: "Total Sale Price" value: "sale_price" } allowed_value: { label: "Total Cost" value: "cost" } allowed_value: { label: "Total Profit" value: "profit" } } measure: dynamic_sum { type: sum sql: ${TABLE}.{% parameter item_to_add_up %} ;; }
This content is subject to limited support.