LogoLogo
HomeDocumentation
  • 🐳Using Whaly Guides
  • Core concepts
    • 📚Getting started
      • Data stack architecture
      • Consumers vs Builders
      • Data layers in Whaly
      • License Mapping
    • 🪄Data modeling
      • Understanding data models
      • Designing data models
      • Common modeling patterns
        • Event schema
      • Maintaining data models
      • Data models best practices
    • 🖌️Explorations
      • Understanding Explorations
      • Designing Explorations
      • Maintaining Explorations
      • Mistakes to avoid
  • Training
    • 👁️For viewers
    • 👩‍💻For editors
    • 🧙For builders
      • Setting up the training material
      • Creating a chart
      • Using and editing explorations
      • Filtering a dashboard
      • Creating explorations and models
  • Inspiration
    • 🗒️Use cases
      • Billing / Invoicing
      • Customer success
      • Fundraising
      • Marketing
      • Partnerships
      • Product
      • Sales
      • Strategy
    • 💬Communication
    • 💡Tips
  • Recipes
    • 🤝Customer care
      • How to build a 360° customer dashboard
    • 🏦Finance
      • Modeling your recurring revenue
        • SQL for simplified MRR calculation
        • SQL for advanced MRR calculation
    • 📣Marketing
      • Track your entire Marketing Funnel
      • Calculate your Customer Acquisition Cost
      • Create a partner dashboard
    • 💼Sales
      • Analyze the impact of your Sales velocity on your closing rate
      • Create a sales performance dashboard
      • Build a target oriented sales dashboard
  • Misc
    • 🧐SQL Fanout
    • 📦Backup your data using BigQuery
    • ☁️Embedding reports in Salesforce
    • 👨‍💻Useful SQL operations
      • Flattening categories
Powered by GitBook
On this page
  • Creating an exploration
  • Creating our data model
  • Updating our exploration
  • Creating our chart
  1. Training
  2. For builders

Creating explorations and models

PreviousFiltering a dashboardNextUse cases

Last updated 2 years ago

Objectives: in this exercise we will learn how to create an exploration, and how to create and use models

Creating an exploration

In this exercise we need to:

Add the number of customers per number of orders

Until now we were using the Order exploration, that was getting data from the order table.

Here, we want to have a chart representing the number of customer per number of order. Some customers may not have placed an order, and we want to count them. So we will need to start our exploration from the customer table and group our customer per number of order.

Let's create our exploration :

  • Head to the Workbench

  • Click on the + the "Add an exploration"

  • Select your Jaffle Shop customer table

On our new exploration, we need to have :

  • The number of customers as a metric

  • The number of orders as a dimension.

This number of order columnis not available in the customer table, but we know we have the data in our database. We have a modelization problem, meaning that the data we have is not in a format that allows our analysis. We will create a data model to overcome this problem and create our chart.

Creating our data model

In the workbench, go to the dataset tab and create a new model. We will create a flow (no-code) model that will start from the customer table of Jaffle shop :

Now we can go the the configuration tab of our model to add calculated columns to our Customer table.

For example let's create a full_name column that will contain the first name and last name of our customer. We will use the CONCAT formula in order to do so :

To add the number of order per customer, we will use a rollup column (which consists of a lookup that matches multiple results in a related table and aggregates these results) :

That's it, now we just need to save our model before being able to use this column in our exploration. To do it, set the output on the last step and click on save.

Updating our exploration

We will need to update our exploration to make it use our new "Customer model" instead of the raw customer table. To do so :

  • Go to the exploration

  • Click on the customer table, and replace the raw data table with your model

  • Create your dimensions and metrics

Creating our chart

We can now create our chart using these metrics and dimensions

🧙