Using extensions in Tableau – Dealing with Complex Visualizations, Customizations, and APIs

It is also possible to use third party services to create visualizations in Tableau. Tableau Exchange (https://exchange.tableau.com/extensions) provides an array of objects that can be used in a Tableau dashboard to create charts but also perform spatial analysis, add custom annotations to charts, and even collaborate in Teams.

Salesforce has its own set of extensions, and there is also a set of extensions developed directly by Tableau.

To access them, follow the below-mentioned steps:

  1. Create a new dashboard by pressing the New Dashboard button at the bottom of your screen, as seen in Figure 6.71:

Figure 6.71: New dashboard

2. Next, drag the Extension object on your dashboard.

Figure 6.72: Add Extension

3. The interface which opens will show all the Extensions available on Tableau Exchange without needing to leave Tableau.

Each extension has its own set of instructions, and in Chapter 9 – Exploring Einstein AI and Advanced Analytics, we will show you how to use the Salesforce Einstein extension, but in the meantime, explore the available range to find the extension that mostly fits your needs. And if you cannot find the perfect one, you are now well-equipped to create every sort of visualization in Tableau.

Conclusion

In conclusion, as we wrap up this insightful journey into the realm of advanced visualizations using Tableau and Salesforce CRM data, it is our hope that you have gained a deeper understanding of the vast capabilities that this visualization tool offers. The power to transform raw, often complex CRM data into meaningful and insightful visual representations lies at your fingertips.

Through this chapter, we aimed to elevate your skills from creating sophisticated Sankey diagrams and calendar-based visualizations to expertly customizing geographical data visualizations. We also discussed the power of third-party integrations, a crucial aspect in today’s interconnected technological landscape. The potential for innovation here is vast, and we encourage you to explore further, continually pushing boundaries to uncover deeper insights from your CRM data.

Remember, fostering a data-curious culture within your organization is a journey, not a destination. Every dataset brings new questions, unique insights, and innovative perspectives. The beauty of data visualization is that it brings us closer to the story hidden within the data, enabling data-driven decision-making crucial for business growth.

We will now move back into Salesforce to look at using Tableau Visualizations within the CRM.

Join our book’s Discord space

Join the book’s Discord Workspace for Latest updates, Offers, Tech happenings around the world, New Release and Sessions with the Authors:

https://discord.bpbonline.com

Advanced maps – Dealing with Complex Visualizations, Customizations, and APIs-1

We can convey several layers of information by using maps in Tableau. We started in the previous chapter with a simple filled map, and we will now take it one step forward by looking at the number of accounts and the revenues on the same map.
Before we do so, you will have to upload some additional data to your org that is required for this visualization. First, download the files available at the GitHub repository for the book.
Now follow these instructions to load the opportunities:

  1. Login to Salesforce and navigate to the ‘Setup’ area by clicking the gear icon in the upper right corner.
  2. In the Quick Find box, type and select Data Import Wizard.
  3. Click on the Launch Wizard button within the Data Import Wizard.
  4. Select the type of object that matches your CSV data, such as Opportunities for opportunity data.
  5. Click on Choose a CSV file, browse to your tfs_opps.csv file, and upload it.
  6. Review the field mappings. The wizard will try to auto-map CSV columns to Salesforce fields. Adjust manually if necessary.
  7. After verifying the field mappings, click Next.
  8. Review your import settings in the summary page and click Start Import.
  9. Monitor the import progress. Salesforce will indicate when the import is complete.
  10. Once the import is complete, check the relevant object in Salesforce, like Opportunities, to ensure the data is correctly imported.
  11. Review any error reports generated by Salesforce and address any issues highlighted.

Repeat this process for the tfs_accs.csv file, the Account object, the tfs_users.csv file, and the Users object.
For this chart, the Account object was used as a primary data source, and the Opportunity object as a secondary data source. Please refer to Chapter 3, Building and Integrating Data Pipelines for details on how to blend data sources.
To create our map, follow these steps:

  1. Double-click on the Billing State/Province field (from the Accounts object). This will create a map, as shown in Figure 6.49:

Figure 6.49: Add Billing State to view

  1. From the Marks menu, change the mark type to Circle, as shown in Figure 6.50:

Figure 6.50: Change mark type to circle

  1. Right-click on Account ID and drag it onto the Size card, choose Count Distinct from the menu that opens, as shown in Figure 6.51:

Figure 6.51: Size by Account count

  1. From the Opportunity object drag Expected Amount to Color (make sure to have set the blend correctly), as shown in Figure 6.52:

Figure 6.52: Color by Expected Revenue

  1. Click on the Color card, then choose Edit Colors, as can be seen in Figure 6.53:

Figure 6.53: Edit colors

  1. Choose the Red – Blue Diverging palette, as shown in Figure 6.54:

Figure 6.54: Change color palette

Funnel charts– Dealing with Complex Visualizations, Customizations, and APIs

One of the most indicative charts for Salesforce data is the funnel chart, which is the chart in which we can follow the progression of our sales pipeline from initial contact to final conclusion.
For this chart, we will use the custom dataset Opportunity History that comes with this book. If you are working with real Salesforce data, you should be able to replicate this chart using the Opportunity History object from your Salesforce environment or your data warehouse, following the instructions in Chapter 3 – Building and Integrating Data Pipelines.
To create a funnel chart, follow these steps:

  1. Filter out “Closed Lost” by using Stage Name as a filter and excluding “Closed Lost”.
  2. Drag Stage Name onto Rows, as shown in the following figure:

Figure 6.24: Drag Stage Name to Rows

  1. Right-click on Opportunity ID and drag it to Columns. In the menu that opens, choose Count Distinct (Figure 6.25).

Figure 6.25: Count distinct Opportunities by Stage

  1. Sort Stage Names in descending order according to the number of opportunities.

Figure 6.26: Sort Stages by count descending
We now need to trick Tableau into creating our funnel chart. To do so:

  1. Right-click on Opportunity ID, drag it to Columns, and drop it next to the green pill you already have there, as shown in Figure 6.27:

Figure 6.27: Copy Opportunity Id to Columns
You should now have two identical bar charts which look like the chart below:

Figure 6.28: Two identical bar charts

  1. Right-click on the left axis and click Edit Axis from the menu that opens, as shown below:

Figure 6.29: Copy Opportunity Id to Columns

  1. Select Reversed, as shown in Figure 6.30:

Figure 6.30: Reverse left axis
Your chart should now look like the one below, already much more like a funnel.

Figure 6.31: Funnel

  1. Drag Stage Name to the Color mark in the All card, as shown in Figure 6.32:

Figure 6.32: Color Stages

  1. Press Ctrl on your keyboard and drag the CNTD (Opportunity ID) field to the Label mark in the All card, as shown in Figure 6.33:

Figure 6.33: Add label

  1. Click on the Label mark on the top CNTD (Opportunity ID) card, as shown in Figure 6.34:

Figure 6.34: Select label

  1. In the Alignment menu, choose left, as shown in Figure 6.35:

Figure 6.35: Align labels left
A funnel would not be a proper funnel without percentages, so we will create a new calculated field and paste the following formula:
This formula divides the number of opportunities at each stage by the number of opportunities in the first stage, thus giving us a view of the percentage of opportunities that continue to the next stage of our sales pipeline.

  1. Give your calculated field a name. The one below, for example, is called “Share of total”.

Figure 6.36: Share of total calculation

  1. Drag your new calculation onto the Label mark in the bottom CNTD (Opportunity ID) card, as can be seen in Figure 6.37:

Figure 6.37: Add calculation to label

  1. Drag CNTD (Opportunity ID) away to remove it from the chart, as can be seen in Figure 6.38:

Figure 6.38: Remove count

  1. Click on the Label mark on the bottom CNTD (Opportunity ID) mark, as shown in Figure 6.39:

Figure 6.39: Select bottom label

  1. In the Alignment menu, choose left, as shown in Figure 6.40:

Figure 6.40: Align bottom labels left

  1. Right click on the calculation you have created and select Default Properties from the menu that opens, next click on Number Format.

Figure 6.41: Open number formatting

  1. In the pane that opens, select percentage, decrease the decimal places to 0, and click on OK, as shown in Figure 6.42:

Figure 6.42: Set percentage format
We are almost there, but we need some cosmetic adjustments for this chart to look like a funnel, follow the below steps to do so:

  1. From the Format menu, click on Borders, as can be seen in Figure 6.43:

Figure 6.43: Open Borders menu

  1. Select None from each menu in Sheet, Rows and Columns (if it does not say so already), as can be seen in Figure 6.44:

Figure 6.44: Select no borders

  1. Click on the Lines icon (Figure 6.45).

Figure 6.45: Open Lines menu

  1. Select None from each menu in Sheet, Rows and Columns (if it does not say so already), as shown in the figure below:

Figure 6.46: Select no lines

  1. Right click on the left axis and untick “Show Header”, as shown in Figure 6.47:

Figure 6.47: Hide left axis header
Your chart should look something like the one below:

Figure 6.48: Funnel final

Filled map– Extracting Deeper Insights with Funnels, Maps, and Hybrid Visualizations

To create a filled map:

  1. Double click on the Billing State/Province field.
  2. Drag Expected Revenue on the Colors mark.
  3. Change the mark type to Maps, as shown in Figure 5.65.

Figure 5.65: Creating filled map

The result should look something like the map in Figure 5.66:

Figure 5.66: Final filled map visualization

We can use the tools mentioned above to zoom in and bring to the center of the view exactly the section of the map we want to show. From here we can see there is a distinct geographic pattern to the revenue we expect, with clusters of states that are close geographically and also present higher revenues.

Conclusion

In conclusion, this chapter has provided you with the knowledge and tools needed to create more advanced visualizations like donut charts, bar-in-bar charts, and maps. You’ve also learned how to harness the power of filters and calculated fields to customize and improve your data analysis. By following the steps outlined in this chapter, you can now dive deeper into your Salesforce data using Tableau, and more effectively communicate your insights to stakeholders.

Understanding geographical patterns, funnel analysis, and performance tracking are just a few of the many insights you can gain from the techniques discussed in this chapter. With this knowledge in hand, you can leverage the full potential of Tableau and Salesforce to make better-informed decisions for your organization. Keep experimenting with different visualizations and techniques as you continue to explore these powerful tools and uncover new insights into your data.

In the next chapter, we will move on to discussing advanced topics for visualization with Tableau.

Maps– Extracting Deeper Insights with Funnels, Maps, and Hybrid Visualizations

Maps are a convenient way of visualizing geographical information and unlocking insights that may be harder to grasp using other formats. Tableau supports maps out of the box and can showcase information up to zip code and street level. To create a map, follow these steps:

  1. The easiest way to create a map is to double-click on the geographical field of your choice. Geographical fields are indicated by a small globe next to their name, as shown in Figure 5.56:

Figure 5.56: Geographical fields marked with globe icon

  1. Any field can become a geographical field; the steps to follow have been described in Chapter 3.
    In this case, the field of choice is Billing Zip Code; double clicking on it produces the map you can see in Figure 5.57:

Figure 5.57: Initial map created by double clicking geo field
Before proceeding, you will notice a small set of icons on the top left corner of your map, as shown in Figure 5.58:

Figure 5.58: Map interaction tool icons
This menu, shown in Figure 5.59, lets you interact with the map and customize the user experience.

Figure 5.59: Additional map tools menu
Each icon has a function, as follows:

  1. Search: By clicking on this icon, you can type the name of a specific location you are looking for (that is, London or 09212).
  2. Zoom in and out: Clicking on the plus sign will zoom into the map, and clicking on the minus sign will zoom out.
  3. Reset button: Clicking on this button will remove any zoom in or out or any manual adjustments you may have performed on the map.
  4. Tool selection: Clicking on this icon will open a small sub-menu, from which you can select a variety of tools, as shown in Figure 5.60:

Figure 5.60: Map selection tool options
• Zoom area: Selecting this tool will change your cursor to a lens that you can use to zoom in on a specific part of the map.
• Pan: Selecting this tool will allow you to rearrange the map manually.
• Rectangular/Radial/Lasso Selection: Each tool allows you to select different points in the map according to your needs.
When sharing your map with your end users, you may want to give them access to all these tools or restrict the experience. You may prefer to restrict the tools available for users if you have set up your map to view only a portion. This may be the best display option if that is the area where your insights are concentrated. To do so, follow these steps:

  1. Click on the Map menu at the top of your Tableau window, as shown in Figure 5.61.

Figure 5.61: Accessing Map menu

  1. Click on Map Options, as shown in Figure 5.62:

Figure 5.62: Opening Map Options dialog

  1. A menu will open on top of the map, as shown in Figure 5.63:

Figure 5.63: Map options dialog

  1. Unticking an item will prevent the end user from accessing the tool. As you can see below, this time we do not let the end user customize its interaction with the map, and the map tools have, therefore, disappeared, as shown in Figure 5.64:

Figure 5.64: Limiting map tools available to user

Donut charts – Extracting Deeper Insights with Funnels, Maps, and Hybrid Visualizations-2

  1. As usual we want to make it more informative. We will start by dragging our measure in the Label menu for our white pie chart, as shown in Figure 5.15:

Figure 5.15: Adding measure to label mark of main pie chart

  1. We will repeat the same step, but for the other menu, as shown in Figure 5.16:

Figure 5.16: Adding measure to label mark of secondary pie chart

  1. Next we will hide both axes, as they are not needed for our chart. To do so, right click on your left axis, and a menu will open, as shown in Figure 5.17:

Figure 5.17: Right clicking on vertical axis to access menu

  1. Click on Show Header, as shown in Figure 5.18:

Figure 5.18: Selecting “Show Header” option to hide axis

  1. To remove all unnecessary lines from the chart, click on Format at the top of your workbook and then on Lines, as shown in Figure 5.19:

Figure 5.19: Accessing Format | Lines menu

  1. The Format Lines menu will open, as shown in Figure 5.20. Open each menu and select None. Repeat this step for the Sheet, Rows and Columns menu:

Figure 5.20: Setting line formatting to None

  1. If you want to also remove the border lines, click on the square icon and select None, as shown in Figure 5.21, for all the menus in Sheet, Rows and Columns:

Figure 5.21: Removing chart border lines

  1. Your donut chart should look, as shown in Figure 5.22. In the center, you can see the full amount and next to each slice, its relative amount.

Figure 5.22: Final customized donut chart

  1. We can also change the absolute amounts into percentages. To do so, we select the menu for our colorful pie chart and click on the measure we have previously added to the Labels mark, as shown in Figure 5.23:

Figure 5.23: Selecting measure pill

  1. Click on Add Table Calculation. A new menu will open, as shown in Figure 5.24:

Figure 5.24: Adding table calculation

  1. In the menu that opens, select Percent of Total from the Calculation Type menu, as shown in Figure 5.25:

Figure 5.25: Setting calculation to Percent of Total

  1. The absolute numbers have now changed into percentages, as shown in Figure 5.26:

Figure 5.26: Measure values converted to percentages

  1. It is possible to have both percentages and absolute numbers by dragging your measure on the Label mark in the colored pie menu, as shown in Figure 5.27:

Figure 5.27: Adding second measure pill for both values

  1. To further aid comprehension, we will add the dimension to the Label as well, and proceeded to format the menu as shown in Figure 5.28:

Figure 5.28: Formatting label marks
The final donut chart should look similar to the one in Figure 5.29:

Figure 5.29: Final informative donut chart

Introduction – Extracting Deeper Insights with Funnels, Maps, and Hybrid Visualizations

In this chapter, we will dive deeper into the world of Tableau visualizations, particularly focusing on intermediate-level charts and features that will help you gain valuable insights from your Salesforce data. We will explore donut charts, funnels, maps, and hybrid visualizations while also learning about filters and calculated fields. By the end of this chapter, you will be well-equipped to create more complex and informative visualizations that can provide powerful insights and help guide business decisions. So, let us get started and take your Tableau and Salesforce skills to the next level!

Structure

The chapter covers the following topics:

  • Introduction to deeper insights
  • Donut charts
  • Filters and calculated fields
  • Bar-in-bar charts
  • Maps

Objectives

In this chapter, we will get to know how to use different types of charts like donut charts and funnel charts. We will learn what they are good for and what their limits are. You will learn how to make donut charts that show your data clearly. We will also go over how to change your data with filters and special calculated fields to make it just right for your needs.

Next, we will cover how to put together bar-in-bar charts. These let you see two sets of data at the same time in one chart, which can give you better insights. Then, we will explore how to use Tableau’s tools to make maps with your data. This can help you see where things are happening in the world.

We will also make sure you know how to tweak these maps so people using them can interact with them easily. You will learn to create filled maps that add color to different areas based on your data. Lastly, we will look at different ways to use maps to spot trends and patterns that have to do with locations. This chapter will give you the skills to turn your data into maps and charts that tell a clear story.

Introducing intermediate visualizations

In the previous chapter, we learned to create several types of visualizations and put them together in a dashboard to help our audience understand our insights more quickly. We will now discuss some more complicated types of charts, use filters, and create calculated fields to bring our ability to gain insight from Salesforce data to the next level.

Treemaps in Tableau – Exploring Charts, Graphs, and Dashboards

The process to create treemaps in Tableau using the Show Me menu is the same as for creating pie charts. The only difference is that rather than clicking on the pie chart icon, you should click on the treemaps icon as shown in Figure 4.38:

Figure 4.38: Creating treemaps in Tableau is just like creating pie charts, but with a treemaps icon

In this case, rather than using Expected Amount, we will be using Amount. Following the same steps as before, this is the final chart, as shown in Figure 4.39:

Figure 4.39: Final chart showing the usage of “Amount” instead of “Expected Amount”

Just as before, we will change from the total amount to the average amount and add more information to the chart to benefit the reader. The final result is shown in Figure 4.40:

Figure 4.40: Chart displaying total and average amounts, enhanced with additional information

Just as in the previous case, it would seem that average amount is the same, but some sources generate more opportunities.

Scatterplots in Tableau

Looking at Opportunities Source gave us some insights, but we want to understand more about where our revenues are coming from, so we will look at Lead Source instead and compare expected revenues with nominal revenues in a scatter plot.

To create a scatter plot in Tableau, start by dragging one of your measures to Rows as shown in Figure 4.41:

Figure 4.41: Scatter plot creation in Tableau: Dragging a measure to Rows

Drag the other measure to Columns as shown in Figure 4.42:

Figure 4.42: Drag the measure to Columns

Drag the dimension used to breaking down your measures to Detail. In this case, we want to compare revenues by Lead Source, so Lead Source is the field we will add to Detail as shown in Figure 4.43:

Figure 4.43: Breaking down measures by Lead Source in a dimension drag

You now have your scatterplot as shown in Figure 4.44:

Figure 4.44: Visualization of the scatterplot

Just as before, to better aid comprehension, the chart can be customized. To add the name of the lead source to the chart, drag Lead Source to the Label mark as shown in Figure 4.45:

Figure 4.45: Adding lead source to the chart for better comprehension

To further differentiate, drag Lead Source to the Color mark. Each circle now has a different color as shown in Figure 4.46:

Figure 4.46: Differentiating lead sources by dragging to the mark, resulting in varying circle colors

It is also possible to choose which shape to display in the chart. To do so, click on the Shape mark. You will now see a selection of shapes from which you can choose your favorite as shown in the Figure 4.47:

Figure 4.47: Choosing a shape for the chart

Here, we chose to replace circles with dots as shown in Figure 4.48:

Figure 4.48: Circular shapes transformed into dots

When comparing totals, unsurprisingly, there is a strong positive correlation between expected revenues and nominal revenues, so the higher the amount in our pipeline, the higher the amount we expect to convert into actual revenues. We can further confirm this by adding a trend line to the chart. To add a trend line, click on the Analysis menu as shown in Figure 4.49:

Figure 4.49: Analysis menu

Hover on Trend Lines as shown in Figure 4.50:

Figure 4.50: Visualizing trends

Click on Show Trend Lines as shown in Figure 4.51:

Figure 4.51: Analyzing trends with the click of a button

This is not the full story though, so we will now compare the average expected amount with the average nominal amount. Following the same steps as before, including the customization, the final chart can be seen in Figure 4.52:

Figure 4.52: Comparing average expected and nominal amounts

Comparing these two charts reveals that some sources bring in higher quality opportunities than others. For example, the two sources that bring in the largest amounts of opportunities, tell a different story when comparing averages. Trade shows bring in more opportunities which are also more likely to realize as concrete revenues. However, opportunities brought in via employee referrals, while many, are less likely to close than they should be. Finally, opportunities brought in via Public Relations are fewer and less likely to close, so we may want to review our strategy there.

Using ‘Show Me’ menu and bar charts – Exploring Charts, Graphs, and Dashboards

The quickest way for a beginner to start creating visualizations in Tableau is to use the Show Me menu, which will showcase a range of ready-made charts and the combinations of Dimensions and Measures you will need to create Figure 4.2:

Figure 4.2: A beginner’s guide: Explore Tableau’s Show Me menu for effortless chart creation

For example, to answer a question like who my largest customer is, you can select Account Name, hold CTRL, and select Annual Revenue, then click on Horizontal Bars in the Show Me menu, as shown in Figure 4.3:

Figure 4.3: Selecting account name and annual revenue, then choose horizontal bars

Tableau will recommend which chart to use with a border. This time, we will agree with the recommendation.

Figure 4.4: Tableau chart

So, this is your first Tableau chart (Figure 4.4). It looks strange, but we wanted to know who our largest customers were. To do that, we need to sort our chart so that the customers with the largest revenue are at the top.

There are several ways to do that; for now, we will click on the Sort button above the columns/rows area, as shown in Figure 4.5:

Figure 4.5: Clicking on the sort button to organize columns/rows

Our chart looks as shown in Figure 4.6:

Figure 4.6: Account chart

It seems that we have a lot of customers with the same level of revenue, so this is probably not the most insightful chart we could create. But with Tableau, we are never more than a few clicks away from finding more information. For example, which industries bring the largest revenue?

To answer that question, we will select the Industry field and drag it on top of the Account Name field in the Rows panel.

We now have a much better-looking chart as shown in Figure 4.7:

Figure 4.7: Better chart

After sorting it in descending order as we did before, this is what our chart looks as shown in Figure 4.8:

Figure 4.8: Descending sorted chart.

We now know that Engineering and Apparel are the largest industries by revenues, with Energy being a distant third.

Introduction – Exploring Charts, Graphs, and Dashboards

This chapter will provide guidance about visualizing Salesforce CRM data in Tableau. We will start with a section on things to remember when visualizing Salesforce data, such as understanding CRM data and the types of analysis you may want to perform. The chapter will then cover the basics of creating visualizations in Tableau, such as using the Show Me menu and creating simple charts.

Structure

The chapter covers the following topics:

  • Fundamentals of creating visualizations in Tableau
    • Using ‘Show Me’ menu and bar charts
    • Line charts in Tableau
    • Tables in Tableau
    • Pie charts in Tableau
    • Treemaps in Tableau
    • Scatterplots in Tableau
  • Bringing all your insights together in a dashboard

Objectives

By the end of this chapter, learners will be able to understand why and how CRM data is crucial for data analysis and decision-making. Specifically, they will be able to recognize different types of analyses that can be performed on Salesforce CRM data, how these might dictate different visualization approaches, and comprehend the factors to consider when visualizing CRM data, including strategies to avoid common visualization pitfalls. They will also familiarize themselves with the key functionalities of Tableau’s “Show Me” menu and basic chart creation techniques. Finally, they will be able to create meaningful visualizations using Salesforce CRM data in Tableau and develop the skills necessary to interpret visualizations effectively, drawing out actionable insights from data presented in visual form.