In this blog, we will discuss how you can use table calculations and level of detail calculations to enhance the comparisons that you are making with the data. We will build on several of the calculations that we have created to show you how to make them more dynamic and contextual.
The table calculations are different from the traditional calculations because they are performed locally on the data in the cache, that is, the data that Tableau Public has used to create the visualization. Not all data that is in your data set is in use all the time. The data in the cache is what Tableau Public is using in the memory to render your visualization. Therefore, the data that you have filtered out will not be included in the table calculations.
Level of detail calculations, which are a new feature in Tableau 9.x, allow you to tell Tableau Public at exactly which dimensional level you want the calculations to be aggregated. We are discussing them along with table calculations because some of the concepts are very similar.LOD Expressions in tableau
Table calculations have the following major functions:
• Calculating change over time as a relative percentage
• Calculating the percentage of a whole attributed to a one-dimensional member
• Calculating change relative to other members of a dimension
• Distinguishing the maximum or minimum values in a partition
• Moving calculations, such as averages and sums
• Running calculations, such as running sums, that are used for waterfall and Pareto graphs
The following are the level of detail calculations that Tableau Public enables you to do:
• Fix the level of aggregation
• Include specific dimensions, that may not be present on the visualization, in calculations
• Exclude specific dimensions, that are present on the visualization, from specific calculations
In this chapter, we will discuss the following table calculations:
• Creating quick table calculations
• Addressing and partitioning table calculations
• Changing over time
• Editing table calculations
• Moving averages – window max and running max
• Ranks and percentiles
• The difference from the average
The level of detail calculation concepts that we will discuss involves fixing, including, and excluding dimensions, as well as nesting calculations and limitations. A brief exercise on editing fields in the shelf to learn from the tableau certification.
About data sources
We will continue using the World Development Indicators data source, as some of these examples will be included in the dashboard that we will develop later in this book. You can download the data from the World Bank by visiting http://data. worldbank.org/products/wdi.
Creating quick table calculations
Tableau Public has a feature that enables the rapid creation of a table calculation. After dragging a field onto the visualization, typically a measure, you can aggregate and perform table calculations on dimensions, or click on its context menu and select for more What are Table Calculations in Tableau?
Quick Table Calculation.
There is one limitation to this—table calculations cannot be created on fields that have forecasting turned on.
The following are some of the many different types of quick table calculations, though not all of them are available at the same time, and the options vary by the type of dimensions and measures that are also on the visualization:
• Running total
• Difference
• Percent difference
• Percent of total
• Rank
• Percentile
• Moving average
• Year to date (YTD) total
• Compound growth rate
• Year over year growth
• Year to date (YTD) growth
Once you have created a table calculation, you can edit it by either clicking on the
Context menu on the pill, or right-clicking on it. For each unique table calculation, we will explain how to modify it and what the components of the formula mean.
Comments
Post a Comment