LookML Scripts for MTD, QTD, YTD, Prev Mth, Prev Qtr, Prev Year for BigQuery Database

Hi Team,

I have BigQuery as a databases and Looker connecting to it. I am trying to create LookML Scripts for these time periods: MTD, QTD, YTD, Prev Mth, Prev Qtr, Prev Year . But having CAST or datatype conversions issues/errors. 

I have followed links like, where its given for RedShift or MySQL, but unable to figure out for BigQuery. Any help will be used as a learning and appreciated. 

https://help.looker.com/hc/en-us/articles/360023510474-Week-to-Date-WTD-Comparison

https://help.looker.com/hc/en-us/articles/360050104194-Methods-for-Period-Over-Period-PoP-Analysis-i...

Can someone help for usage of right functions/keywords for BigQuery? Also I have the below Dimension_group table in my script

dimension_group: rfrnc_dte {
    type: time
    timeframes: [
      raw,
      date,
      week,
      month,
      quarter,
      year,
      day_of_week,
      day_of_week_index,
      day_of_month,
      day_of_year,
      week_of_year,
      month_name,
      month_num
    ]
    convert_tz: no
    datatype: date
    sql: ${TABLE}.RFRNC_DTE ;;
  }

0 1 779
1 REPLY 1

Sometimes I had to add `CAST (${TABLE}.field AS TIMETAMP)` to Looker with BigQuery

Top Labels in this Space
Top Solution Authors