Problem in implementing Period over Period Analysis

Hi team,

I am quite new to Looker so every input is valuable for me.

I am trying to implement period over period analysis. I am following this article https://help.looker.com/hc/en-us/articles/360050104194-Methods-for-Period-Over-Period-PoP-Analysis-i...

I have chosen simple way to start with “Any Two Native Timeframes”. I am assuming this is the easiest one. 

As per article I have created dimension 

    dimension: wtd_only {        group_label: "To-Date Filters"        label: "WTD"        view_label: "_PoP"        type: yesno        sql:  (EXTRACT(DOW FROM ${created_raw}) < EXTRACT(DOW FROM GETDATE())                OR            (EXTRACT(DOW FROM ${created_raw}) = EXTRACT(DOW FROM GETDATE()) AND            EXTRACT(HOUR FROM ${created_raw}) < EXTRACT(HOUR FROM GETDATE()))                OR            (EXTRACT(DOW FROM ${created_raw}) = EXTRACT(DOW FROM GETDATE()) AND            EXTRACT(HOUR FROM ${created_raw}) <= EXTRACT(HOUR FROM GETDATE()) AND            EXTRACT(MINUTE FROM ${created_raw}) < EXTRACT(MINUTE FROM GETDATE())))  ;;    }

and when I execute it, it returns error Query execution failed: - A valid date part name is required but found DOW at [4:28

d5bfabee-c5ce-4f9f-873f-910157608e76.png

I tried to fix it and replaced DOW by day_of_week but no luck

46d1c8cd-4640-4a4f-8bc2-d382df94c192.png

This is what I am trying to run:

c610cdff-caea-49b0-b7d6-d25dea7c35bb.png

Please help me to undertstand what I am missing?

Thanks in advance

Rohit

Solved Solved
0 4 481
1 ACCEPTED SOLUTION

Hi there, I think “DOW” needs to be replaced with DAYOFWEEK. Give it a shot and let me know if it doesn’t work.

View solution in original post

4 REPLIES 4
Top Labels in this Space
Top Solution Authors