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-2

In one map, we can now see in which states we have the most accounts and the largest revenue. An even more interesting pattern emerges in which the number of accounts and the revenues do not go hand in hand. Rather, we can see even more clearly the clusters where we would expect large revenues (that is California) but are instead seeing poor performances. All of these clusters are close together, so there must be a geographical explanation of what we are seeing (Figure 6.55).

Figure 6.55: Colored dots
To proceed with the next step, we need to create a new dataset that joins the objects Accounts, Opportunities, and Users. This will allow us to bring together the geographical information related to the accounts, the financial information tied to opportunities, and the geographical locations pertaining to our sales representatives, which can be found in the User object. Alternatively, you can use the dataset provided in this book.
Since 2019, Tableau has allowed the option to perform spatial analysis even in cases where spatial files are unavailable, as long as information such as latitude and longitude is provided. Luckily, Salesforce provides this information out of the box for both Accounts and Users.
Let us go back to our original map and work from the assumption that since we have spotted a geographical pattern in our data, geography could also present a solution, in this case, by looking at where our sales representatives are located against our accounts and the revenue we expect to generate.
In the previous case, we have built a map at the state level. Now, we will go down to the city level. The process is the same as described before, but this time, we will start with the Billing City field rather than the Billing State. The final result should look something like the map below:

Figure 6.56: Sized dots
When we break our data down by cities, the contrast is even starker. We see that California has several accounts but low expected revenues, while revenues in Texas seem to be driven by a specific city. At the border between Nebraska and Iowa, we have our most profitable accounts. How does this compare with the geographical location of our sales representatives?
To answer this question, we will start by creating a spatial object out of the latitude and longitude of our User object. To do so, follow the below-mentioned steps:

  1. Create a calculated field and write the following formula:
  2. Give a name to your calculation, then press OK.
  3. Drag the field you have just created to the map and then on top of the Add a Marks Layer icon on your map, as shown below.

Figure 6.57: Add user locations layer
You will notice now that there is an additional dop on top of each account; this is the location of each sales representative (Figure 6.58).

Figure 6.58: Users Layer

  1. As usual, we can improve upon this. First, change the kind of mark for the User Location field from Automatic to Shape, as shown in Figure 6.59:

Figure 6.59: Change mark type to shape

Pareto charts– Dealing with Complex Visualizations, Customizations, and APIs-2

You now have your chart with your reference line, but we can make it a bit clearer. Follow these steps:

  1. Right click on the Reference line you just created and click on Edit, as seen in Figure 6.14:

Figure 6.14: Right click the reference line

  1. In the window that opens, choose Custom from the Label menu, as can be seen below:

Figure 6.15: Set custom label

  1. Write something that helps users understand what the line represents, for example, “80% of all sales come from the accounts below this line”, as shown below:

Figure 6.16: Reference line label

  1. Click on OK.
    We can see that the 80/20 rule does not apply to our case (Figure 6.17), but we cannot yet see clearly where that line is; it seems to be somewhere between 30 and 40%, but is that the case? We can find out exactly and, at the same time, improve our Tableau skills.

Figure 6.17: Copy Id field
For this next stage, press CTRL on your keyboard and drag the ID field from Columns to the Detail mark, as seen in Figure 6.18. This should copy not only the field but also the sorting we set up earlier.

Figure 6.18: Id field copied
From here, follow these steps:

  1. Click on the caret on the Id pill, hover on Measure, then select Count (distinct), as seen in Figure 6.19:

Figure 6.19: Change Id measure to Count (distinct)

  1. Do not panic if your chart looks broken now; we are about to fix it. Click on the now green ID pill and apply the same table calculation we applied on the SUM (Amount) pill, with the same options, as shown below:

Figure 6.20: Apply table calculations to copied Id field

  1. You now have a Pareto chart, which tells you that 37% of your accounts drive 80% of your revenues (Figure 6.21).

Figure 6.21: First reference line at 80%
Some other insights are:
• Adding a second reference line at 50% tells us that it is 17% of our accounts that drive half of our sales, as shown in Figure 6.22:

Figure 6.22: Second reference line at 50%
• Adding a third reference line at 10% tells us that it is our sixth-largest account that drives 10% of our sales, as can be seen in Figure 6.23:

Figure 6.23: Third reference line at 10%

Objectives– Dealing with Complex Visualizations, Customizations, and APIs

Introduction

In this chapter, we explore the untapped potential of Tableau in conjunction with Salesforce CRM data, diving deep into advanced visualizations to unlock richer insights. From a comprehensive look at advanced capabilities, including Sankey charts and calendar-based visualizations, to mastering customized geographical data visualizations, we will take you through the endless customization possibilities that Tableau offers. We will cap it off with a look at third-party integrations, examining how they can enrich your visualizations and optimize decision-making. This chapter aims to inspire you to push boundaries, fostering an innovative and data-curious culture within your organization. Let us embark on this exciting journey together to unravel the full extent of Tableau’s power and transform your CRM data into meaningful, actionable information.

Structure

The chapter covers the following topics:

  • Introducing the advanced capabilities of Tableau
  • Using extensions in Tableau

Objectives

Upon completing this chapter, readers will be able to understand the advanced capabilities of Tableau in visualizing CRM data by learning to create and interpret advanced charts such as Sankey diagrams and calendar visualizations and exploring ways to customize visualizations using geographical data. They will also discover how to utilize third-party integrations to augment data visualization capabilities and develop the necessary skills to uncover deeper insights and patterns from your CRM data. Finally, they will gain proficiency in transforming raw CRM data into meaningful, actionable visual insights and learn to use Tableau features and tools effectively to support data-driven decision-making processes.

Introducing advanced visualizations

At this point, we should feel quite comfortable with creating charts in Tableau, so we will now take it a bit further by looking at creating charts that require to make use of the full range of customization options in Tableau. We will use calculated fields and table calculations and finally bring together several datasets to showcase the possibilities of spatial analysis in Tableau’s maps.

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

Filters and calculated fields – Extracting Deeper Insights with Funnels, Maps, and Hybrid Visualizations

We will again use donut charts to look at the ratio of lost to won opportunities per lead source. To do so, we will have to perform two operations:
• Filter the stage so that it only shows opportunities that have been either Lost or Won.
• Create a new field that labels each opportunity as lost, won, or still open.
From a new sheet, the steps to perform are as follows:

  1. Drag Stage to the Filters card. A menu will open, as shown in Figure 5.30:

Figure 5.30: Adding Stage filter

  1. Select Closed Lost and Closed Won from the available list and press OK, as shown in Figure 5.31:

Figure 5.31: Selecting specific Stage values to filter

  1. There are several ways to create a calculated field in Tableau. The two most popular ones are the following: 1. Click on the caret next to the search function on top of your dimension list, then select Create Calculated Field, as shown in Figure 5.32:

Figure 5.32: Accessing Create Calculated Field option

  1. From the Analysis menu at the top of your sheet, click on Create Calculated Field , as shown in Figure 5.33:

Figure 5.33: Accessing Create Calculated Field via Analysis menu

  1. The calculated field window will now open. In this window, you can find five things, as shown in Figure 5.34:
  1. Calculation title: This is where you can type the name you will give to the new field you are creating.
  2. Calculation area: This is where you will write the logic that determines the output of the field you are creating.
  3. Function list: This is the list of ready-made functions available to use, which are not too dissimilar from what you can find in Excel or SQL. When you select a function, Tableau shows you what it does and gives you an example of how to use it.
  4. Apply button: Clicking this button will create your calculated field or modify your calculated field but will not close the window. It is useful if you are trying different calculations until you set on the final one.
  5. OK button: Clicking this button will create your calculated field or modify your calculated field, then close the window. It is useful if you are satisfied with the calculation.

Figure 5.34: Calculated Field window overview

  1. Since we want to create a new field based on Stage, we will use an IF function. The formula is as follows:
    IF [Stage] = ‘Closed Lost’ THEN ‘Lost’

ELSEIF [Stage] = ‘Closed Won’ THEN ‘Won’

ELSE ’Still Open’

END

  1. As a title, we will write Lost, Won or Open, then press OK, as shown in Figure 5.35:

Figure 5.35: Creating Lost, Won or Open calculated field
Calculated fields are automatically added to the list of fields and can be distinguished by the little equal sign that precedes their data type, as shown in Figure 5.36:

Figure 5.36: New calculated field added to dimensions list
You can always change a calculated field in Tableau, just by right clicking on the name and selecting Edit from the menu that opens, as shown in Figure 5.37:

Figure 5.37: Editing a calculated field

  1. Now that you have filtered your Opportunities and created a new calculated field, follow the steps in the previous section to create a new donut chart. The final result should look something like Figure 5.38:

Figure 5.38: Final donut chart with calculated field

  1. To compare the share of lost and won opportunities by lead source so we will drag Lead Source to Columns, as shown in Figure 5.39:

Figure 5.39: Adding Lead Source to Columns shelf

  1. Tableau has created a series of donut charts, one for each lead source, as shown in Figure 5.40:

Figure 5.40: Donut charts showing breakdown by Lead Source

  1. We can see that some lead sources provide opportunities that are more likely to close, but our calculation does not show the share of lost and won opportunities per lead source.
    To change it, click on the field used for the share calculation. It has a triangle next to its name, as shown in Figure 5.41.

Figure 5.41: Selecting share calculation pill

  1. From the menu that opens, click on Edit Table Calculation, as shown in Figure 5.42:

Figure 5.42: Accessing Edit Table Calculation

  1. From the menu that opens, click on Cell, then click on the x in the top right corner to close the menu, as shown in Figure 5.43:

Figure 5.43: Changing table calculation to Cell level
Your calculation should now be correct, as shown in Figure 5.44:

Figure 5.44: Correct donut chart calculations

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.

Conclusion – Exploring Charts, Graphs, and Dashboards

In this chapter, we have explored various methods for connecting to data in Tableau and delved into the software’s data cleaning and transformation capabilities. We learned how to connect to Salesforce data using the Salesforce Connector and how to authenticate and configure the connection successfully.

We also discussed connecting to data exported to a SQL database and highlighted scenarios where this method may be beneficial. Furthermore, we have equipped you with the skills to manipulate data in Tableau using techniques such as pivot, join, and split once the data is loaded into the software.

In addition, we have covered managing data sources in Tableau, including connecting to multiple data sources, creating data source filters, and crafting calculated fields. With the knowledge and skills gained from this chapter, you are now better prepared to effectively connect to, clean, and transform data in Tableau for enhanced data analysis and visualization. This will ultimately enable you to make more informed decisions and drive impactful insights from your data.

In the next chapter, we will delve into the core functionality that makes Tableau such a powerful visualization tool.

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

Pie charts in Tableau – Exploring Charts, Graphs, and Dashboards

The easiest way to create pie charts and tree maps in Tableau is to use the Show Me menu (an alternative way to create pie charts will be discussed in the next chapter). For this example, we will be using the Opportunities data which can be found under the Standard Connection tab in the data menu as shown in Figure 4.21:

Figure 4.21: Tableau’s Show Me menu simplifies the creation of diagrams

Disclaimer: Pie charts become hard to read when they are split into more than two categories, and the same information can be represented in other charts, which take up less screen space, so please use them sparingly.

To start, double-click on Opportunity Source in the Dimensions menu as shown in Figure 4.22. Tableau will automatically add it to Rows.

Figure 4.22: Opportunity source

Next, double-click on Expected Amount. Tableau will automatically add it to the Label mark as shown in Figure 4.23:

Figure 4.23: Tableau adds Expected Amount to Label mark.

Finally, click on the Show Me menu and select the pie chart visualization from the menu as shown in Figure 4.24:

Figure 4.24: Choosing the pie chart from the Show Me menu

Tableau will now create a pie chart for you, as shown in Figure 4.25:

Figure 4.25: Tableau effortlessly creates a pie chart

However, this pie chart is not very informative, so let us try and add more information. Clicking on the Size mark will allow us to resize the pie chart as shown in Figure 4.26:

Figure 4.26: Enhancing pie chart by resizing to convey more information

We chose to make it bigger as shown in Figure 4.27:

Figure 4.27: Enhanced Pie Chart

Next, we dragged Opportunity Source and Expected Amount to the Label mark so that both fields are shown in the chart in Figure 4.28:

Figure 4.28: Chart displaying the next steps

On second thought, the average Expected Amount may be more informative than the total Expected Amount. Click on the first green pill in the Marks menu to change the chart from the total to the average as shown in Figure 4.29:

Figure 4.29: The importance of average Expected Amount for better insights

From the menu, click on Measure (Sum), as shown in Figure 4.30:

Figure 4.30: Select Measure (Sum) from the menu

Choose Average from the list as shown in Figure 4.31:

Figure 4.31: Select ‘Average’ option from the list

Repeat for all your measures as shown in Figure 4.32:

Figure 4.32: Precision and efficiency in every step

The pie chart looks much different from before as shown in Figure 4.33:

Figure 4.33: Updated pie chart introduces significant changes

For added context, we will also add the total Expected Amount to the chart. To do so, drag Expected Amount to the Label mark as shown in Figure 4.34:

Figure 4.34: Drag Expected Amount to the Label mark for added context

However, while it may be clear to the dashboard creator what the chart shows, another user may need more information. We will therefore write what each number represents. To do so, click on the Label mark as shown in Figure 4.35:

Figure 4.35: Clarify chart details by clicking on the Label mark

Click on the three horizontal dots next to Text as shown in Figure 4.36:

Figure 4.36: Options menu icon allows access to additional functions

A menu will open, from which you can choose how to format your text. However, you can also add more information. Here we have added in bold the definitions for all the fields shown in Figure 4.37:

Figure 4.37: Text formatting and field definitions displayed on a menu interface

We now understand that there is not a great difference in the average expected amount that can be attributed to each source, but some sources seem to be generating more opportunities than others.

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.