Report not found

There was a problem finding this report.
Heat Map
June 23, 2016 · Refreshed 5 months ago
Cloned from Sales Dashboard
Description
For more information on how to customize chart colors, visit https://community.modeanalytics.com/gallery/heat-map .

Collaborators

Run History
WITH users AS ( SELECT user_id, activated_at, state, language FROM tutorial.playbook_users ), events AS ( SELECT user_id, event_name, occurred_at, device, location FROM tutorial.playbook_events ) SELECT *, tally/first_period::FLOAT AS rate FROM ( SELECT x.cohort, MAX(x.period_age) OVER (PARTITION BY x.cohort) AS cutoff_age, x.period_age, x.tally, MAX(x.tally) OVER (PARTITION BY x.cohort) AS first_period FROM ( SELECT DATE_TRUNC('week',u.activated_at) AS cohort, FLOOR(EXTRACT('day' FROM e.occurred_at - u.activated_at)/7) AS period_age, COUNT(DISTINCT u.user_id) AS tally FROM users u LEFT JOIN events e ON e.user_id = u.user_id WHERE u.activated_at IS NOT NULL AND u.activated_at >= '2014-05-01' GROUP BY 1,2 ) x ) y WHERE period_age != 0 ORDER BY 1,2,3
WITH users AS ( SELECT user_id, activated_at, state, language FROM tutorial.playbook_users ), events AS ( SELECT user_id, event_name, occurred_at, device, location FROM tutorial.playbook_events ) SELECT *, tally/first_period::FLOAT AS rate FROM ( SELECT x.cohort, MAX(x.period_age) OVER (PARTITION BY x.cohort) AS cutoff_age, x.period_age, x.tally, MAX(x.tally) OVER (PARTITION BY x.cohort) AS first_period FROM ( SELECT DATE_TRUNC('week',u.activated_at) AS cohort, FLOOR(EXTRACT('day' FROM e.occurred_at - u.activated_at)/7) AS period_age, COUNT(DISTINCT u.user_id) AS tally FROM users u LEFT JOIN events e ON e.user_id = u.user_id WHERE u.activated_at IS NOT NULL AND u.activated_at >= '2014-05-01' GROUP BY 1,2 ) x ) y WHERE period_age != 0 ORDER BY 1,2,3
<link rel="stylesheet" href="https://mode.github.io/alamode/alamode.min.css"> <script src="https://mode.github.io/alamode/alamode.min.js"></script> <div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <script> alamode.retentionHeatmap( { query_name: "Customer Retention", cohort_column: "cohort", pivot_column: "period_age", value_column: "rate", total_column: "first_period", title: "Cutomer retention by user age", pivot_label: "Periods out", value_is_percent: true, color_gradient: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"], precision: 0 } ) </script>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled