Jan 7, 2023
Building a lens – Blending Tableau with Traditional CRM Analytics
A lens is a visual representation of the data within a dataset, allowing you to explore data graphically and construct queries for a dashboard. To build a lens, follow the steps below:
- Click on the Analytics Studio tab to return to the CRM Analytics Home page.
- Click Browse and then select Datasets.
- Choose the opportunity_history dataset, which will open a new tab, shown below, with a lens for exploring the dataset.

Figure 8.10: Opportunity_history dataset details
- In the New Lens tab, click on Count of Rows located beneath Bar Length, as shown in the following screenshot:

Figure 8.11: Lens builder with Count of Rows highlighted
- Select Sum and then choose Amount from the dropdown menu, as shown in the next screenshot:

Figure 8.12: Sum Amount selected
- Under Bars, click the plus sign (+) and select Industry, as shown below:

Figure 8.13: Industry field added to lens
- Click the plus sign (+) under Bars again, and choose Opportunity Type, as shown below:

Figure 8.14: Opportunity Type added to lens
- Under Bar Length, click the arrow next to Sum of Amount and select Sort Descending, shown in Figure 8.15:

Figure 8.15: Sort descending selected
- Click the Charts icon to access different chart options, shown in the following screenshot:

Figure 8.16: Charts icon highlighted
- Select the Stacked Column chart icon, shown in the screenshot below, to create a Stacked Column chart, which will display the sum of the amount according to the industry.

Figure 8.17: Stacked column chart selected
- Save your lens by clicking the Save button.
- Enter My Test Lens, indicated in the following screenshot, as the title of your new lens, and then choose App | My Test App from the dropdown menu.

Figure 8.18: Save lens dialogue
- Click Save to complete the process.
Your final product should look like the following:

Figure 8.19: Completed stacked column lens visualization
With your app, dataset, and lens now created, you can proceed to create a dashboard.