Qualify in LookML - Workaround

  • 23 November 2022
  • 0 replies
  • 10 views

Hello! Attempting to use the “QUALIFY” sql statement (working with Snowflake), I found pretty tricky but elegant solution to use that:

  1. Declare a measure with partition by in “sql”
  2. In an explore use sql_always_having attribute with the bare condition (1=1) and then write the “QUALIFY” keyword along with the conditions required.
measure: my_mes {
type: number
sql: SUM(${mes}) OVER (PARTITION BY ${my_dim}) ;;
}

------------ explore ------------

sql_always_having: 1=1
QUALIFY
${my_mes} >= 100000000
;;

 


0 replies

Be the first to reply!

Reply