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
I tried to fix it and replaced DOW by day_of_week but no luck
This is what I am trying to run:
Please help me to undertstand what I am missing?
Thanks in advance
Rohit
Solved! Go to 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.