-
Notifications
You must be signed in to change notification settings - Fork 0
/
payment.view.lookml
61 lines (49 loc) · 1.13 KB
/
payment.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
- view: payment
fields:
- dimension: payment_id
primary_key: true
type: int
sql: ${TABLE}.payment_id
- dimension: amount
type: number
sql: ${TABLE}.amount
- dimension: customer_id
type: int
# hidden: true
sql: ${TABLE}.customer_id
- dimension_group: last_update
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.last_update
- dimension_group: payment
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.payment_date
- dimension: rental_id
type: int
# hidden: true
sql: ${TABLE}.rental_id
- dimension: staff_id
type: yesno
# hidden: true
sql: ${TABLE}.staff_id
- measure: total_revenue
type: sum
sql: ${amount}
value_format: '$#,##0.00'
drill_fields: [payment_month, total_revenue]
- measure: count
type: count
drill_fields: detail*
# ----- Sets of fields for drilling ------
sets:
detail:
- payment_id
- customer.customer_id
- customer.first_name
- customer.last_name
- staff.staff_id
- staff.first_name
- staff.last_name
- staff.username
- rental.rental_id