This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.
Yes, a window function like the one explained by Michael will work on
Redshift, Bigquery, or Snowflake Be sure not to include type: sum in
your measure declaration or Looker will output the SQL as sum(sum(col2)
over ()) and throw an error.
measure: your_1_to_5_measure { type: average sql: ${name_of_field} ;;
html: {% if value < 2.5 %} <P>{<!-- -->{
rendered_value }}</P> {% else %} <P>{<!-- -->{ rendered_value }}</P> {% endif %};; } I’m assuming
this measure is an average. …you could also do something like this if
y<!-- -->...
In the field list on the left of your Explore click on “Custom Fields”.
Then click “New”, and select “Table Calculation” In the text area add
sum(${Col2}) …give the field a name (“Col3” in your example), add
formatting, and then save. This should giv...
Try using running_total( if(${users.is_registered} = yes, 1, 0) ) This
will increment a total in the column each time a row has a value of yes
in the users.is_registered column no | 0 yes | 1 no | 1 no | 1 yes | 2
no | 2 etc