B2B Marketing Analytics: How to Create a Lens – Part 3

Share this article...

Getting started with B2B Marketing Analytics can be overwhelming. As marketers, our success story is heavily reliant on the data. This series aims to demystify Salesforce’s Einstein Analytics for Marketers, taking you through how I get my clients up to speed, including creating datasets, lenses and dashboards and understanding how to leverage the data. Let’s help you get up to speed, so you can leverage B2B Marketing Analytics to tell your success story and take data-driven actions to maximize your sales and marketing efforts.

In Part 2, we learned how to create and join datasets that we built to meet our own business reporting requirements. Now let’s look at how we start to use these practically, using lenses.

What are Lenses?

A lens is a specific view of your dataset’s data. They are the building blocks to dashboards.

When you build a lens, you want to start out with a question in mind and define your goal. What do you want to know?

You’ll select a dataset that correlates to your question, for instance, if you want to gauge campaign performance based on email performance, you can choose the dataset we just created when joining the email template and Salesforce campaign datasets.

Once you’ve selected your dataset you need to select your measures and how you will group your data. The measure is the quantitative value such as revenue or open rate. It would be a mathematical calculation. Groups are guided by a dimension which is a qualitative metric like region.

Once you have selected your group and measure, you’ll need to select how you’d like to visualize your data.

Visualization Guidelines

Here are some quick tips when choosing how to visualise your data:

    1. Chose something that is easily understandable.
    2. Think about your end-user.
    3. Try not to pick something that needs scrolling.
    4. You don’t need a different chart for each lens.

How to Create a Lens

For this example, let’s create a lens, using the dataset we just created, to understand the ROI of our CTR on campaigns.

1. Log into Salesforce.

2. Select the Analytics studio app from the app manager.

3. Navigate to datasets and select the dataset you need to create your lens.

4. You’ll see a new lens open with the default measure of the count of rows.

5. First, let’s change the measure of the bar length to “Sum of total CTR”.

6. Then, let’s break out the metrics by the campaign, select “campaign name” under bars. Your new chart should look like the below:

7. Then choose your visualization. On the right-hand side, click the visualization button and try different chart types.

8. Quick Tip: to change this to the donut chart, click donut in the darts panel, and move the campaign name to the segment.

9. Don’t forget to save your new lens.

You have now created your lens. You can save the lens or you can click on the scissors icon and it will copy the lens and you can paste it directly into your dashboard.


In our previous pot, we learned how to create a dataset, which is a set of source data, specifically optimized for our interactive exploration. The exploration happens through the lens. We can use the data from the dataset to create our visualization through the lens, so we can get a particular view into the datasets data. When you’re creating your lens, don’t overthink it, if the donut chart of the bar chart is the best visualization then use that option. The purpose of the lens is to make the data into a visualization that is easily digested by an end user.

B2BMA is included in specific packages if you don’t have it reach out to your account executive. For help in getting started, reach out to us here, for a complimentary consult, we’d love to help!

Add Comment