dating_platform/customer_score.view.lookml 6 dims3 measures 3 warnings Repo files

LookML view · dating-platform

The user_score view: lead score, expected LTV and lead value per user

At a glance

Does
Reads one row per user from public.user_score: score, score_pre_signup, demographic_quality, expected_ltv and value. Three measures average them.Trust: Source-defined
Why
Ranks users and leads by predicted worth, so acquisition and product teams can compare cohorts by expected value.Trust: Inferred
Grain
One row per user. id is a hidden primary key that the model joins to user ids.Trust: Inferred
Source
dating_platform/customer_score.view.lookml 50 lines
Source: customer_score.view.lookml L1-10
dating_platform/customer_score.view.lookmlL1-10
- view: user_score  sql_table_name: public.user_score  fields:  - dimension: id    primary_key: true    type: int    sql: ${TABLE}.id    hidden: true  - dimension: demographic_quality    type: number    sql: ${TABLE}.demographic_quality    decimals: 4  - dimension: expected_ltv

dating-platform, customer_score.view.lookml, lines 1-10

Shape

Trust: Source-defined

Every field as declared, with the dashboard tiles that read it. Computed from the source; nothing here is edited.

Table: public.user_score

Dimensions 6

NameTypeSQLUsed byTags
idL4int${TABLE}.id-primary keyhidden
demographic_qualityL9number${TABLE}.demographic_quality-
expected_ltvL13number${TABLE}.expected_ltv_if_converted-
scoreL17number${TABLE}.score-
score_pre_signupL21number${TABLE}.score_pre_signup-
valueL25number${TABLE}.value_of_lead-

Measures 3

NameTypeSQLUsed byTags
avg_scoreL29avg${score}-derived
avg_expected_ltvL34avg${expected_ltv}-derived
avg_valueL39avg${value}-derived

Relationships

Trust: Source-defined
Relationships of user_score
Relationships of user_score. Text version follows the diagram.This viewUsed by: explores, views, dashboardsas user_score, fk users.idas user_score, fk user_metrics.id transactions explore in enterprise tests explore in enterprise
  • This Block
  • No relationship declared
Text version
  • user_score is joined into transactions: as user_score, fk users.id (no relationship declared)
  • user_score is joined into tests: as user_score, fk user_metrics.id (no relationship declared)

Worth noticing

expected_ltv hides a condition

Trust: Source-defined

expected_ltv reads expected_ltv_if_converted. It is the lifetime value if the user converts, not a probability-weighted value.

Source: customer_score.view.lookml L13-16
dating_platform/customer_score.view.lookmlL13-16
    type: number    sql: ${TABLE}.demographic_quality    decimals: 4  - dimension: expected_ltv    type: number    sql: ${TABLE}.expected_ltv_if_converted    decimals: 2  - dimension: score    type: number    sql: ${TABLE}.score

dating-platform, customer_score.view.lookml, lines 13-16

Joined only for keys

Trust: Source-defined

The transactions and tests explores join user_score with fields: [], so none of its fields can be selected there.

Source: enterprise.model.lookml L17-19
dating_platform/enterprise.model.lookmlL17-19
  - join: subscriptions    sql_foreign_key: transactions.subscription_id    fields: []  - join: user_score    sql_foreign_key: users.id    fields: []- explore: messages  view: messages  always_filter:

dating-platform, enterprise.model.lookml, lines 17-19

What can change the answer 3

Caution: Average expected LTV overstates value

Trust: Inferred

avg_expected_ltv averages a value that assumes conversion. Leads who never convert count at their full converted value.

What goes wrong: A cohort chart of average expected LTV reads like revenue per user when most users never pay.

Source: customer_score.view.lookml L34-38
dating_platform/customer_score.view.lookmlL34-38
    sql: ${score}    decimals: 4    detail: detail*  - measure: avg_expected_ltv    type: avg    sql: ${expected_ltv}    decimals: 2    detail: detail*  - measure: avg_value    type: avg    sql: ${value}

dating-platform, customer_score.view.lookml, lines 34-38

Caution: The dashboard asks for a view named scores

Trust: Source-defined

The Average Expected LTV tile requests scores.avg_expected_ltv from a users explore. No view or join is named scores, and no model declares a users explore.

What goes wrong: The only dashboard use of this view cannot run.

Read the guide: Missing tables and stale references

Source: company_overview.dashboard.lookml L90-100
dating_platform/company_overview.dashboard.lookmlL90-100
    width: null    height: null    legend_align: null  - name: average_lifetime_value    title: Average Expected LTV    type: looker_line    explore: users    dimensions:    - users.created_month    measures:    - scores.avg_expected_ltv    listen:      date_filter: users.created_date    limit: 500    width: null    height: null    legend_align: null

dating-platform, company_overview.dashboard.lookml, lines 90-100

Note: value is a lead-stage value

Trust: Source-defined

value reads value_of_lead. The short field name hides that it is a lead-stage value.

Source: customer_score.view.lookml L25-28
dating_platform/customer_score.view.lookmlL25-28
    type: number    sql: ${TABLE}.score_pre_signup    decimals: 10  - dimension: value    type: number    sql: ${TABLE}.value_of_lead    decimals: 4  - measure: avg_score    type: avg    sql: ${score}

dating-platform, customer_score.view.lookml, lines 25-28

Related

Guides built on this file

Related source files

Source model