-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily_status.view.lookml
47 lines (37 loc) · 1010 Bytes
/
daily_status.view.lookml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
- explore: daily_status
joins:
- join: daily_events
foreign_key: effdt_date
- view: daily_status
derived_table:
sql: |
SELECT
DATE(view_employee_timeperiods_day_denormal.todate) AS effdt,
SUM(view_employee_timeperiods_day_denormal.headcount) AS headcount
FROM one.view_employee_timeperiods_day_denormal AS view_employee_timeperiods_day_denormal
WHERE
{% condition effdt_date %} view_employee_timeperiods_day_denormal.todate {% endcondition %}
GROUP BY 1
ORDER BY 1 DESC
fields:
# - measure: count
# type: count
# detail: detail*
- dimension: effdt_date
type: date
primary_key: true
sql: ${TABLE}.effdt
- dimension_group: effdt
type: time
timeframes: [week, month, year]
sql: ${TABLE}.effdt
- dimension: headcount
type: number
sql: ${TABLE}.headcount
- measure: average_headcount
type: average
sql: ${headcount}
sets:
detail:
- effdt
- headcount