Syntax for Referencing Parameters

Use the syntax provided in this topic to reference parameters from a visualization's properties, SQL expression, or calculations.

Use this syntax to reference a parameter:

@parameter("parameter name")('default value')

This table contains expression syntax examples:
Parameter Expression Description
@parameter("Supplier")('Brembo') References the Supplier parameter. The parameter value is 'Brembo' unless the Supplier parameter is passed into the workbook via data actions or URL parameters.
@parameter("StartDate")('2021-10-08') References a parameter named StartDate with a default date of Oct 8th, 2021.
@parameter("NumOccurrences")(5) References a parameter named NumOccurrences with a default of 5.
@parameter("SelectedColumn")("A - Sample Sales"."Offices"."D2 Department"') References a parameter named SelectedColumn, and defaults to "A - Sample Sales"."Offices"."D2 Department".
@parameter("Supplier", style="delimited", separator="/")('Brembo','Bosch') References a parameter named Supplier, and the value defaults to "Brembo/Bosch" when used.
@parameter("Supplier", style="individual")('Brembo','Bosch') References a parameter named Supplier, and is used by data actions to separate parameters:

&myParam=Brembo&myParam=Bosch

@parameter("Supplier", type="alias")('Brembo','Bosch') References a parameter named Supplier and uses any configured alias values, if they exist. Alias uses values if alias isn't configured.
@parameter("Supplier", type="value")('Brembo','Bosch') References a parameter named Supplier and uses any configured values, regardless of whether an alias is configured.