In Tableau, I have the following raw data:

```Month,Total
2021-08,17
2021-09,34
2021-10,41
2021-11,26
2021-12,6```

Using the formula below, you may arrive to the following result.

```RUNNING_SUM(
COUNTD(IF [Inserted At]>=[Parameters].[Start Date]
AND [Inserted At]<=[End Date]
THEN [Id] ELSE NULL END
))

/

LOOKUP(RUNNING_SUM(
COUNTD(IF [Inserted At]>=[Parameters].[Start Date]
AND [Inserted At]<=[End Date]
THEN [Id] ELSE NULL END
)),-1)*100-100```

We get,

```Month,My_Calc
2021-08,NULL
2021-09,200
2021-10,80.4
2021-11,28.3
2021-12,5.1```

And all I actually want as a major measure is 5.1 (last monthly value) ( percent Month-Over-Month Growth).

I'm not sure how I'm going to do it.

I'm new to Tableau and have no idea how to utilise calculated fields in combination with the date groups feature to determine month-over-month growth. I tried using the native year-over-year growth running total table calculation, but it didn't work since my calculating technique is different.

Apr 11, 2022 in Tableau 1,643 views

## 1 answer to this question.

First, a quick introduction to table calculations, followed by the answer at the end.

The data source (e.g. database server) does the majority of Tableau's calculations, and the results are subsequently delivered to Tableau (i.e. the client) for presentation. Even when dealing with very huge data sets, this division of duties allows for good performance.

Table computations, on the other hand, work with the table of query results received from the server. They are carried out near the end of the pipeline's order of operations. That's why table calcs work with aggregated data, thus you'll need to ask for WINDOW SUM(SUM([Sales)) rather than WINDOW SUM([Sales)) ([Sales])

Before presenting the query results obtained from the data source to the user, you may utilise table calcs to do last passes of computations over them. You can do things like compute a running total or dynamically change the visualisation layout based on the query results. The computation is only one component of defining a table calc, therefore this freedom comes at a cost. You must also define how the calculation should be applied to the table of summary results, a process called as partitioning and addressing. A useful definition of partitioning and addressing may be found in the Tableau online documentation.

Table calculations, also known as vectors or windows, are applied to blocks of summary data at a time. Partitioning is how you tell Tableau how you want the summary query results broken up into panes so you can apply your table calc. The way you indicate the sequence in which you want to traverse those partitions is using addressing. Some table calcs, such as RUNNING SUM, require addressing, whereas others, such as WINDOW SUM, do not.

To truly comprehend table calculations, it is also beneficial to learn about the functions INDEX(), SIZE(), FIRST(), LAST(), WINDOW SUM(), LOOKUP(), and (eventually) PREVIOUS VALUE(). You'll be able to implement all of these functions utilising only two of them as the essential ones if you properly grasp them.

Finally, to answer your question in part:

To determine if you are at the last value of your division, use the boolean expression LAST() = 0. You may hide all the other values by using that formula as a filter. You'll need to make sure the partitioning and addressing are set up appropriately. You'd be retrieving a batch of data from your server, using it in client calculations, but just displaying a portion of it. Depending on which fields are on which shelves, this can be a bit brittle, but it can work.

If you can avoid requesting data exclusively for client-side calculations, it's usually more efficient to utilise a calculation that can be performed server-side, such as LOD calc. Table calcs, on the other hand, are a helpful tool if the data has already been fetched for another purpose or if the calculation requires table calc features, such as the ability to depend on the order of the values.

Unlock the Power of Data Visualization with Our Tableau Course.

answered Apr 12, 2022 by
• 9,060 points

## In Tableau, How to sum the last 7 days of the value?

It can be achieved easily by creating ...READ MORE

## Is it possible to pass a Measure Value in Tableau as a parameter?

Hi, Yes, it is possible to pass a ...READ MORE

## How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

## MDX query in Tableau pivot table

You can view them here - \My Documents\My ...READ MORE

+1 vote

## Is it possible to access or install tableau desktop insde tableau server?

Try to understand this, Tableau Server and ...READ MORE

## Hover text shows numbers in decimal points

Do this: 1. Right click on the calculated ...READ MORE

## Dropdown to change x-axis in Tableau

You need to create a  str datatype parameter ...READ MORE

## Tableau Desktop- Tableau Server

No, you don't necessarily need to purchase ...READ MORE