View the original community article here
Last Tested: Jan 21, 2019
DCL tip: To display custom liquid formatting, use {{ rendered_value }} instead of {{ value}}
- {{ value }}
- The output displays the standard result from querying your database.
- Used when datatypes don't matter
Output of the code below will be only display the raw query data. (ie. 12345)
measure: total_sales {
type: sum
sql: ${TABLE}.Total_Sale ;;
html:<p style="font-size:50px;font-family:monotype;>{{value}}</p>;; value_format_name: usd_0
}
- {{ rendered_value }}
- Output displays the results from querying your database with formatting applied to it.
- Used when datatypes do matter
Output of the code below will display the query data with formatting applied to it. (ie. $12,345) *font size and family change carried to visualization*
measure: total_sales {
type: sum
sql: ${TABLE}.Total_Sale ;;
html:<p style="font-size:50px;font-family:monotype;>{{rendered_value}}</p>;; value_format_name: usd_0 }
For more in-depth information about liquid variables check out this doc.
This content is subject to limited support.