From 29f11f2d16aa914a35433a8967f1d2fa969f318e Mon Sep 17 00:00:00 2001 From: Taylor Ferguson <57729118+taylor-ferguson@users.noreply.github.com> Date: Thu, 6 Feb 2020 16:24:25 -0700 Subject: [PATCH] Update query_history.view.lkml Previous is_prior_mtd breaks during January --- query_history.view.lkml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query_history.view.lkml b/query_history.view.lkml index ebf30d1..c6e131b 100644 --- a/query_history.view.lkml +++ b/query_history.view.lkml @@ -179,8 +179,8 @@ view: query_history { dimension: is_prior_month_mtd { type: yesno - sql: EXTRACT(month, ${start_raw}) = EXTRACT(month, current_timestamp()) - 1 - and ${start_raw} <= dateadd(month, -1, current_timestamp()) ;; + sql: EXTRACT(month, ${start_raw}) = EXTRACT(month, current_timestamp()) - 1 + AND EXTRACT(year, ${start_raw}) = EXTRACT(year, current_timestamp()) - 1 ;; } measure: query_count {