-
Notifications
You must be signed in to change notification settings - Fork 2
Measure types unique
justjkk edited this page Jan 22, 2012
·
1 revision
- It measures the count of unique occurrences of a field
- It is an increment only measure like
heat
andtr_type
is not used
{
"name": "weekly_tickets_and_travels",
"measures": [
"TicketsSold",
"UniqueTravels"
],
"data_db": 4,
"query_dimensions": ["Week"],
"slice_dimensions": ["Week"],
"mapping": {
"TicketsSold": {
"type": "heat",
"resource": "ticket_events",
"conditions": [
{
"field": "event",
"equals": "sold"
}
]
},
"UniqueTravels": {
"type": "unique",
"field": "TravelsID",
"resource": "ticket_events",
"conditions": [
{
"field": "event",
"equals": "sold"
}
]
},
"Week": {
"type": "week",
"resource": "ticket_events",
"field": "departure"
}
}
}
- In the above example, the count of travels that made at least one sale is measured using the
unique
type