LKML
Saas legislation
Opportunity
Opportunity model for saas legislation.
inferred
Blocks
_opportunity.view.lkml · 519 lines
inferred
view: _opportunity {
sql_table_name: salesforce.opportunity ;;
dimension: id {
primary_key: yes
sql: ${TABLE}.id ;;
}
dimension: account_id {
sql: ${TABLE}.account_id ;;
}
dimension: amount {
type: number
sql: ${TABLE}.amount ;;
}
dimension: bd__closing__stage__notes___c {
sql: ${TABLE}.bd__closing__stage__notes___c ;;
}
dimension: begin__review__negotiation__of__terms___c {
sql: ${TABLE}.begin__review__negotiation__of__terms___c ;;
}
dimension: billing__cycle___c {
sql: ${TABLE}.billing__cycle___c ;;
}
dimension: budget__confirmed__and__approved___c {
sql: ${TABLE}.budget__confirmed__and__approved___c ;;
}
dimension: client__believes__placeholder__unique__to__solve__prob___c {
sql: ${TABLE}.client__believes__placeholder__unique__to__solve__prob___c ;;
}
dimension: fiscal {
sql: ${TABLE}.fiscal ;;
}
dimension: fiscal_quarter {
type: number
sql: ${TABLE}.fiscal_quarter ;;
}
dimension: fiscal_year {
type: number
sql: ${TABLE}.fiscal_year ;;
}
dimension: commit__stage__notes___c {
sql: ${TABLE}.commit__stage__notes___c ;;
}
dimension: competition__identified___c {
sql: ${TABLE}.competition__identified___c ;;
}
dimension: trial_duration {
description: "trial start to op close"
sql: CASE WHEN ${is_closed} THEN DATEDIFF(day, ${trial_start_date}, ${close_date})
ELSE DATEDIFF(day, ${trial_start_date}, current_date) END ;;
}
dimension: duration {
description: "op created to close"
sql: CASE WHEN ${is_closed} THEN DATEDIFF(day, ${created_date}, ${close_date})
ELSE DATEDIFF(day, ${created_date}, current_date) END ;;
}
dimension: created_by_id {
hidden: yes
sql: ${TABLE}.created_by_id ;;
}
dimension: cs__transition__plan__discussed___c {
sql: ${TABLE}.cs__transition__plan__discussed___c ;;
}
dimension: current__services__used___c {
sql: ${TABLE}.current__services__used___c ;;
}
dimension: decision__maker___c {
sql: ${TABLE}.decision__maker___c ;;
}
dimension: decision__makers__identified___c {
sql: ${TABLE}.decision__makers__identified___c ;;
}
dimension: description {
sql: ${TABLE}.description ;;
}
dimension: differentiated__value__proposition__created___c {
sql: ${TABLE}.differentiated__value__proposition__created___c ;;
}
dimension: dm__committed__to__sign__by__date__verbal___c {
sql: ${TABLE}.dm__committed__to__sign__by__date__verbal___c ;;
}
dimension: estimated__number__of__seats___c {
type: number
sql: ${TABLE}.estimated__number__of__seats___c ;;
}
dimension: evaluation___c {
type: yesno
sql: ${TABLE}.evaluation___c ;;
}
dimension: placeholder__preferred__vendor__or__finalist___c {
sql: ${TABLE}.placeholder__preferred__vendor__or__finalist___c ;;
}
dimension: placeholder__selected__as__vendor__of__choice___c {
sql: ${TABLE}.placeholder__selected__as__vendor__of__choice___c ;;
}
dimension: placeholder__service__order__created___c {
sql: ${TABLE}.placeholder__service__order__created___c ;;
}
dimension: forecast_category {
sql: ${TABLE}.forecast_category ;;
}
dimension: forecast_category_name {
sql: ${TABLE}.forecast_category_name ;;
}
dimension: free__months___c {
type: number
sql: ${TABLE}.free__months___c ;;
}
dimension: gs__cta___c {
sql: ${TABLE}.gs__cta___c ;;
}
dimension: has_opportunity_line_item {
type: yesno
sql: ${TABLE}.has_opportunity_line_item ;;
}
dimension: if__custom__work__resources__reserved___c {
sql: ${TABLE}.if__custom__work__resources__reserved___c ;;
}
dimension: is_closed {
type: yesno
sql: ${TABLE}.is_closed ;;
}
dimension: is_deleted {
type: yesno
sql: ${TABLE}.is_deleted ;;
}
dimension: is_won {
type: yesno
sql: ${TABLE}.is_won ;;
}
dimension: last_modified_by_id {
sql: ${TABLE}.last_modified_by_id ;;
}
dimension: lead_source {
sql: ${TABLE}.lead_source ;;
}
dimension: loss__reason___c {
sql: ${TABLE}.loss__reason___c ;;
}
dimension: mix_panel__link___c {
sql: ${TABLE}.mix_panel__link___c ;;
}
dimension: name {
sql: ${TABLE}.name ;;
}
dimension: negotiation__stage__notes___c {
sql: ${TABLE}.negotiation__stage__notes___c ;;
}
dimension: next_step {
sql: ${TABLE}.next_step ;;
}
dimension: no__of__atlantis__users___c {
type: number
sql: ${TABLE}.no__of__atlantis__users___c ;;
}
dimension: no__of__prophecy__users___c {
type: number
sql: ${TABLE}.no__of__prophecy__users___c ;;
}
dimension: no__of__sonar__users___c {
type: number
sql: ${TABLE}.no__of__sonar__users___c ;;
}
dimension: users {
type: number
sql: ${TABLE}.of__users___c ;;
}
dimension: one__time__revenue___c {
type: number
sql: ${TABLE}.one__time__revenue___c ;;
}
dimension: opportunity__sfdc__update__completed___c {
sql: ${TABLE}.opportunity__sfdc__update__completed___c ;;
}
dimension: other__services__evaluating___c {
sql: ${TABLE}.other__services__evaluating___c ;;
}
dimension: owner_id {
sql: ${TABLE}.owner_id ;;
}
dimension: path__to__purchase__defined___c {
sql: ${TABLE}.path__to__purchase__defined___c ;;
}
dimension: preferred__features___c {
sql: ${TABLE}.preferred__features___c ;;
}
dimension: pricebook_2_id {
sql: ${TABLE}.pricebook_2_id ;;
}
dimension: probability {
type: number
sql: ${TABLE}.probability ;;
}
dimension: product___c {
sql: ${TABLE}.product___c ;;
}
dimension: project__success__criteria__identified___c {
sql: ${TABLE}.project__success__criteria__identified___c ;;
}
dimension: project__team__confirmed__if__needed___c {
sql: ${TABLE}.project__team__confirmed__if__needed___c ;;
}
dimension: proposal__created___c {
sql: ${TABLE}.proposal__created___c ;;
}
dimension: proposal__stage__notes___c {
sql: ${TABLE}.proposal__stage__notes___c ;;
}
dimension: reasons__qualified___c {
sql: ${TABLE}.reasons__qualified___c ;;
}
dimension: received__signed__copy__of__service__order___c {
sql: ${TABLE}.received__signed__copy__of__service__order___c ;;
}
dimension: recommended__features___c {
sql: ${TABLE}.recommended__features___c ;;
}
dimension: arr {
type: number
sql: ${TABLE}.set_annual__recurring__revenue__arr___c ;;
}
dimension: signed__docs__in__house__and__executed___c {
sql: ${TABLE}.signed__docs__in__house__and__executed___c ;;
}
dimension: sold__through___c {
sql: ${TABLE}.sold__through___c ;;
}
dimension: stage__contract__out___c {
type: yesno
sql: ${TABLE}.stage__contract__out___c ;;
}
dimension: stage__demo___c {
type: yesno
sql: ${TABLE}.stage__demo___c ;;
}
dimension: stage__on__trial___c {
type: yesno
sql: ${TABLE}.stage__on__trial___c ;;
}
dimension: stage__pac___c {
type: yesno
sql: ${TABLE}.stage__pac___c ;;
}
dimension: stage__trial__is__set___c {
type: yesno
sql: ${TABLE}.stage__trial__is__set___c ;;
}
dimension: stage__verbal__agreement___c {
type: yesno
sql: ${TABLE}.stage__verbal__agreement___c ;;
}
dimension: stage_name {
drill_fields: [id, name, stage_name, forecast_category_name, amount]
sql: ${TABLE}.stage_name ;;
}
dimension: states__most__interested__in___c {
sql: ${TABLE}.states__most__interested__in___c ;;
}
dimension: synced_quote_id {
sql: ${TABLE}.synced_quote_id ;;
}
dimension: type {
sql: ${TABLE}.type ;;
}
dimension: unimportant_features {
sql: ${TABLE}.unimportant__features___c ;;
}
dimension: upsell {
type: yesno
sql: ${TABLE}.upsell___c ;;
}
dimension: amount_bucket {
type: tier
sql: ${amount} ;;
}
dimension_group: close {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.close_date ;;
}
dimension_group: contract_end {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.contract__end__date___c ;;
}
dimension_group: contract_start {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.contract__start__date___c ;;
}
dimension_group: created {
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.created_date ;;
}
dimension_group: date__of___1_st__invoice___c {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.date__of___1_st__invoice___c ;;
}
dimension_group: last_activity {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.last_activity_date ;;
}
dimension_group: last_modified {
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.last_modified_date ;;
}
dimension_group: last_referenced {
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.last_referenced_date ;;
}
dimension_group: last_viewed {
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.last_viewed_date ;;
}
dimension_group: official__churn__date___c {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.official__churn__date___c ;;
}
dimension_group: trial_end {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.trial__end__date___c ;;
}
dimension_group: trial_start {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.trial__start__date___c ;;
}
dimension_group: stuck__in__contract__until___c {
type: time
timeframes: [date, week, month]
convert_tz: no
sql: ${TABLE}.stuck__in__contract__until___c ;;
}
dimension_group: system_modstamp {
type: time
timeframes: [time, date, week, month]
sql: ${TABLE}.system_modstamp ;;
}
measure: count {
type: count
drill_fields: [id, name, stage_name, forecast_category_name, amount]
}
measure: won_count {
type: count
filters: [is_won: "True"]
filters: [is_closed: "True"]
drill_fields: [id, name, stage_name, forecast_category_name, amount]
}
measure: cumulative_count {
type: running_total
drill_fields: [id, name, stage_name, forecast_category_name, amount]
sql: ${count} ;;
}
measure: total_amount_projected {
type: sum
filters: [is_closed: "False"]
sql: ${amount}*${probability}/100.0 ;;
}
measure: total_amount_won {
type: sum
value_format: "$#,##0.00"
filters: [is_won: "True"]
drill_fields: [_opportunity.id, _opportunity.name, _opportunity.created_date, _opportunity.close_date, _opportunity.total_amount]
sql: ${amount} ;;
}
measure: total_amount {
type: sum
value_format: "$#,##0.00"
drill_fields: [detail]
sql: ${amount} ;;
}
measure: cummulative_total_amount_won {
type: running_total
drill_fields: [id, name, stage_name, forecast_category_name, amount]
sql: ${total_amount_won} ;;
}
measure: cummulative_total_amount_projected {
type: running_total
drill_fields: [id, name, stage_name, forecast_category_name, amount]
sql: ${total_amount_projected} ;;
}
measure: average_contract_value {
type: average
filters: [is_closed: "True"]
filters: [is_won: "True"]
drill_fields: [detail]
sql: ${amount} ;;
}
measure: avg_trial_to_close {
type: average
filters: [is_closed: "True"]
sql: ${trial_duration} ;;
}
measure: avg_time_to_close {
type: sum
filters: [is_closed: "True"]
sql: ${duration} ;;
}
}
_opportunity.view.lookml · 399 lines
source-preserved
- view: _opportunity
sql_table_name: salesforce.opportunity
fields:
- dimension: id
primary_key: true
sql: ${TABLE}.id
- dimension: account_id
sql: ${TABLE}.account_id
- dimension: amount
type: number
sql: ${TABLE}.amount
- dimension: bd__closing__stage__notes___c
sql: ${TABLE}.bd__closing__stage__notes___c
- dimension: begin__review__negotiation__of__terms___c
sql: ${TABLE}.begin__review__negotiation__of__terms___c
- dimension: billing__cycle___c
sql: ${TABLE}.billing__cycle___c
- dimension: budget__confirmed__and__approved___c
sql: ${TABLE}.budget__confirmed__and__approved___c
- dimension: client__believes__placeholder__unique__to__solve__prob___c
sql: ${TABLE}.client__believes__placeholder__unique__to__solve__prob___c
- dimension: fiscal
sql: ${TABLE}.fiscal
- dimension: fiscal_quarter
type: number
sql: ${TABLE}.fiscal_quarter
- dimension: fiscal_year
type: number
sql: ${TABLE}.fiscal_year
- dimension: commit__stage__notes___c
sql: ${TABLE}.commit__stage__notes___c
- dimension: competition__identified___c
sql: ${TABLE}.competition__identified___c
- dimension: trial_duration
description: trial start to op close
sql: CASE WHEN ${is_closed} THEN DATEDIFF(day, ${trial_start_date}, ${close_date})
ELSE DATEDIFF(day, ${trial_start_date}, current_date) END
- dimension: duration
description: op created to close
sql: CASE WHEN ${is_closed} THEN DATEDIFF(day, ${created_date}, ${close_date})
ELSE DATEDIFF(day, ${created_date}, current_date) END
- dimension: created_by_id
hidden: true
sql: ${TABLE}.created_by_id
- dimension: cs__transition__plan__discussed___c
sql: ${TABLE}.cs__transition__plan__discussed___c
- dimension: current__services__used___c
sql: ${TABLE}.current__services__used___c
- dimension: decision__maker___c
sql: ${TABLE}.decision__maker___c
- dimension: decision__makers__identified___c
sql: ${TABLE}.decision__makers__identified___c
- dimension: description
sql: ${TABLE}.description
- dimension: differentiated__value__proposition__created___c
sql: ${TABLE}.differentiated__value__proposition__created___c
- dimension: dm__committed__to__sign__by__date__verbal___c
sql: ${TABLE}.dm__committed__to__sign__by__date__verbal___c
- dimension: estimated__number__of__seats___c
type: number
sql: ${TABLE}.estimated__number__of__seats___c
- dimension: evaluation___c
type: yesno
sql: ${TABLE}.evaluation___c
- dimension: placeholder__preferred__vendor__or__finalist___c
sql: ${TABLE}.placeholder__preferred__vendor__or__finalist___c
- dimension: placeholder__selected__as__vendor__of__choice___c
sql: ${TABLE}.placeholder__selected__as__vendor__of__choice___c
- dimension: placeholder__service__order__created___c
sql: ${TABLE}.placeholder__service__order__created___c
- dimension: forecast_category
sql: ${TABLE}.forecast_category
- dimension: forecast_category_name
sql: ${TABLE}.forecast_category_name
- dimension: free__months___c
type: number
sql: ${TABLE}.free__months___c
- dimension: gs__cta___c
sql: ${TABLE}.gs__cta___c
- dimension: has_opportunity_line_item
type: yesno
sql: ${TABLE}.has_opportunity_line_item
- dimension: if__custom__work__resources__reserved___c
sql: ${TABLE}.if__custom__work__resources__reserved___c
- dimension: is_closed
type: yesno
sql: ${TABLE}.is_closed
- dimension: is_deleted
type: yesno
sql: ${TABLE}.is_deleted
- dimension: is_won
type: yesno
sql: ${TABLE}.is_won
- dimension: last_modified_by_id
sql: ${TABLE}.last_modified_by_id
- dimension: lead_source
sql: ${TABLE}.lead_source
- dimension: loss__reason___c
sql: ${TABLE}.loss__reason___c
- dimension: mix_panel__link___c
sql: ${TABLE}.mix_panel__link___c
- dimension: name
sql: ${TABLE}.name
- dimension: negotiation__stage__notes___c
sql: ${TABLE}.negotiation__stage__notes___c
- dimension: next_step
sql: ${TABLE}.next_step
- dimension: no__of__atlantis__users___c
type: number
sql: ${TABLE}.no__of__atlantis__users___c
- dimension: no__of__prophecy__users___c
type: number
sql: ${TABLE}.no__of__prophecy__users___c
- dimension: no__of__sonar__users___c
type: number
sql: ${TABLE}.no__of__sonar__users___c
- dimension: users
type: number
sql: ${TABLE}.of__users___c
- dimension: one__time__revenue___c
type: number
sql: ${TABLE}.one__time__revenue___c
- dimension: opportunity__sfdc__update__completed___c
sql: ${TABLE}.opportunity__sfdc__update__completed___c
- dimension: other__services__evaluating___c
sql: ${TABLE}.other__services__evaluating___c
- dimension: owner_id
sql: ${TABLE}.owner_id
- dimension: path__to__purchase__defined___c
sql: ${TABLE}.path__to__purchase__defined___c
- dimension: preferred__features___c
sql: ${TABLE}.preferred__features___c
- dimension: pricebook_2_id
sql: ${TABLE}.pricebook_2_id
- dimension: probability
type: number
sql: ${TABLE}.probability
- dimension: product___c
sql: ${TABLE}.product___c
- dimension: project__success__criteria__identified___c
sql: ${TABLE}.project__success__criteria__identified___c
- dimension: project__team__confirmed__if__needed___c
sql: ${TABLE}.project__team__confirmed__if__needed___c
- dimension: proposal__created___c
sql: ${TABLE}.proposal__created___c
- dimension: proposal__stage__notes___c
sql: ${TABLE}.proposal__stage__notes___c
- dimension: reasons__qualified___c
sql: ${TABLE}.reasons__qualified___c
- dimension: received__signed__copy__of__service__order___c
sql: ${TABLE}.received__signed__copy__of__service__order___c
- dimension: recommended__features___c
sql: ${TABLE}.recommended__features___c
- dimension: arr
type: number
sql: ${TABLE}.set_annual__recurring__revenue__arr___c
- dimension: signed__docs__in__house__and__executed___c
sql: ${TABLE}.signed__docs__in__house__and__executed___c
- dimension: sold__through___c
sql: ${TABLE}.sold__through___c
- dimension: stage__contract__out___c
type: yesno
sql: ${TABLE}.stage__contract__out___c
- dimension: stage__demo___c
type: yesno
sql: ${TABLE}.stage__demo___c
- dimension: stage__on__trial___c
type: yesno
sql: ${TABLE}.stage__on__trial___c
- dimension: stage__pac___c
type: yesno
sql: ${TABLE}.stage__pac___c
- dimension: stage__trial__is__set___c
type: yesno
sql: ${TABLE}.stage__trial__is__set___c
- dimension: stage__verbal__agreement___c
type: yesno
sql: ${TABLE}.stage__verbal__agreement___c
- dimension: stage_name
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
sql: ${TABLE}.stage_name
- dimension: states__most__interested__in___c
sql: ${TABLE}.states__most__interested__in___c
- dimension: synced_quote_id
sql: ${TABLE}.synced_quote_id
- dimension: type
sql: ${TABLE}.type
- dimension: unimportant_features
sql: ${TABLE}.unimportant__features___c
- dimension: upsell
type: yesno
sql: ${TABLE}.upsell___c
- dimension: amount_bucket
type: tier
sql: ${amount}
- dimension_group: close
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.close_date
- dimension_group: contract_end
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.contract__end__date___c
- dimension_group: contract_start
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.contract__start__date___c
- dimension_group: created
type: time
timeframes:
- time
- date
- week
- month
sql: ${TABLE}.created_date
- dimension_group: date__of___1_st__invoice___c
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.date__of___1_st__invoice___c
- dimension_group: last_activity
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.last_activity_date
- dimension_group: last_modified
type: time
timeframes:
- time
- date
- week
- month
sql: ${TABLE}.last_modified_date
- dimension_group: last_referenced
type: time
timeframes:
- time
- date
- week
- month
sql: ${TABLE}.last_referenced_date
- dimension_group: last_viewed
type: time
timeframes:
- time
- date
- week
- month
sql: ${TABLE}.last_viewed_date
- dimension_group: official__churn__date___c
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.official__churn__date___c
- dimension_group: trial_end
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.trial__end__date___c
- dimension_group: trial_start
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.trial__start__date___c
- dimension_group: stuck__in__contract__until___c
type: time
timeframes:
- date
- week
- month
convert_tz: false
sql: ${TABLE}.stuck__in__contract__until___c
- dimension_group: system_modstamp
type: time
timeframes:
- time
- date
- week
- month
sql: ${TABLE}.system_modstamp
- measure: count
type: count
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
- measure: won_count
type: count
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
filters:
- is_won: True
- is_closed: True
- measure: cumulative_count
type: running_total
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
sql: ${count}
- measure: total_amount_projected
type: sum
filters:
- is_closed: False
sql: ${amount}*${probability}/100.0
- measure: total_amount_won
type: sum
value_format: '$#,##0.00'
drill_fields:
- _opportunity.id
- _opportunity.name
- _opportunity.created_date
- _opportunity.close_date
- _opportunity.total_amount
filters:
- is_won: True
sql: ${amount}
- measure: total_amount
type: sum
value_format: '$#,##0.00'
drill_fields:
- detail
sql: ${amount}
- measure: cummulative_total_amount_won
type: running_total
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
sql: ${total_amount_won}
- measure: cummulative_total_amount_projected
type: running_total
drill_fields:
- id
- name
- stage_name
- forecast_category_name
- amount
sql: ${total_amount_projected}
- measure: average_contract_value
type: average
drill_fields:
- detail
filters:
- is_closed: True
- is_won: True
sql: ${amount}
- measure: avg_trial_to_close
type: average
filters:
- is_closed: True
sql: ${trial_duration}
- measure: avg_time_to_close
type: sum
filters:
- is_closed: True
sql: ${duration}
Contents
- _opportunity.view.lkml
- _opportunity.view.lookml