# Table Calculation in Tableau – Calculation Function

## 1. Tableau Table Calculation

This Tableau Table Calculations tutorial, we explained what is Tableau Table Calculations advanced functions and their uses. It also demonstrates how to create a table calculation in Tableau using the calculation editor.

## 2. What is Table Calculation in Tableau?

Table Calculation in **Tableau** is the counts which are connected to the qualities in the whole table. For instance, for figuring a running aggregate or running normal, we have to apply a solitary technique for a count to a whole segment. Such computations can’t be performed on some chose lines.

**Read about Tableau Design Flow in Tableau Dashboard & Worksheet**

## 3. Types of Calculation in Table Calculation

These are some important Table Calculation in Tableau, we discuss them one by one:

### a. Percent change from a reference date

With table calculations in Tableau, you’ll be able to calculate the p.c amendment from an associate discretionary price. Suppose you’re inquisitive about a portfolio of stocks and need to gauge the relative performance of them from a degree in time. To do this, you would like to line associate “investment date” and normalize them to an equivalent purpose in time, with lines showing share amendment. You modify the reference date victimization the slider.

**Do you know Dealing With Data Quality Problems In Tableau**

### b. Common baseline (Toy Story)

You may need to examine information from a standard place to begin instead of over associate absolute timeline. As an example, here area unit the box workplace receipts for the 3 Toy Story movies. It’s a lot of easier to match them if you look into gross receipts by week since the gap date:

### c. Percent-of-total sales over time (multi-pass aggregation)

It’s common to need to perform 2 Tableau table calculations right away. As an example, it may be fascinating to examine however a phase has big or shrunken in importance to the corporate over time. To do this, you want to 1st cipher running add of sales by phase over time, then look into that as a p.c of all sales over time. This is conjointly referred to as multi-pass aggregation and it can be eluded even writing a formula in Tableau.

**Let’s learn Tableau Operators- Arithmetic, Relational & Logical Operators**

### d. Protective ranking even whereas sorting

Here we’d like to examine the rank of a product at intervals a month and year, then show however its ranking changes across time. To realize this, we tend to produce a bump chart, that shows amendment over time as a line chart. On the left, we are able to see however copiers and fax machines have gone from a poorly acting product to presently being out the third largest vendor. We are able to conjointly see that there has been plenty of volatility within the purchase of fax and apparatus machines.

### e. Running total

You need to watch the number of active support cases at your call center, or stock on shelves. However, the system doesn’t record the rolling total of active cases and you would like to derive it. This can be adequate to # of Cases at Day Open + New Cases + Reopened Cases – Closed cases.

**Read about Editing/Managing Metadata in Tableau**

On the surface, this can be an easy calculation. However, the daily gap position springs from the previous day shut, which, in turn, springs from that day’s gap position. This creates a circular reference of calculations.

### f. Weighted average

Data like check scores or order priority lends itself to an analysis by weighted average. Maybe you’re gazing the common priority of all orders across product varieties and need to weight that priority by order volume, in order that higher-volume product receives the next priority score. You would possibly use that weighted average priority score to optimize you provide chain for high-volume, high-priority product. Here we tend to just do that victimization Superstore sales data:

### g. Grouping by a calculation

If you area unit managing a company’s shipping operations you will have an interest in which products’ shipping prices are beyond average. In Tableau six, you’ll be able to cipher the common across a window and use that in a very calculation to cluster and color values.

**Let’s explore Tableau Aggregate Functions with Examples**

### h. Variety of incidents over a moving very

Diverse situations like retail, intelligence, or border management usually involve the number of times an occurrence has occurred at intervals a window. As an example, one suspicious event could also be an associate anomaly, however, if it happens quite n times in x days, then it warrants investigation.

The dots show the number of times associate alert or the alarm has been raised – usually zero. A dot higher than zero shows that associate alert was triggered thereon day, and a bar shows that the alarm has been triggered quite n times in x days. The user will right click and show information for each dots and bars.

**Let’s look at Tableau Formatting – Types of Formats in Tableau**

### i. Moving average over variable periods

You have computed the moving average for sales for all months by victimization the fast table calculation functions in Tableau, however, would currently prefer to extend it in order that you’ll be able to select what percentage periods you would like to average.

The pale blue line shows the addition of sales for all months whereas the orange line shows the 15-period moving average of sales.

The combination of a Parameter and a custom-built fast Table Calculation for moving average lets US average over variable periods.

**Let’s learn How to Create Sparklines Chart**

### j. Distinction from the average by an amount

You may be additional inquisitive about seeing the distinction in quarterly sales from that year’s average than absolutely the variety. Here we tend to show each the distinction between the year’s average and therefore the absolute variety of orders.

## 4. Conclusion

In this Tableau tutorial, we learned about the table calculation in Tableau, how to create Table Calculation in Tableau, a stepwise procedure to create them. Furthermore, if you have any query, feel free to ask in a comment section.