Table Calculations – Why apply them ‘By Cell’

Table Calculations – Why apply them ‘By Cell’

//

A question I was recently asked by an in training Tableau User was ‘Why would I apply a table calculation by cell?’. To answer this I have produced a simple example of a by cell Table Calculation. Before I get to it I would like to run through some Table Calculation basics.

Calculation Direction

One of the key principles in Table Calculations is the direction of the calculation. Consider the following table which shows the ‘Running Sum’ table calculation running ‘Table Across’:

Across

As you can see this running sum is running horizontally left to right and restarting on each row. If you ran the calculation again, this time ‘Table Down’ the calculation would work vertically down the table restarting for each column.

Down

‘Across then down’ runs first horizontally and then carries the result to the next row running against the entire table:

Across Then Down

Down then across runs vertically but carries the result to the next column of data, working across the whole table.

Down then across

By Cell

The by cell calculation runs the calculation for a single cell of data (i.e. the lowest level of granularity in the view) Consider the following example:

This chart shows Sales broken down by product type and market. I have applied ‘Type’ to the colour of the chart and set up my table calculation as percentage of total.

What I would like to see is the % split between decaf and regular sales for each Product Type and Market. By default this calculation has been applied as ‘Table Across’ so each colour split is the % of the total for the entire row of data.

If I want to see the split value for each cell I need to set the calculation to run ‘By Cell’. Click ‘By Cell’ to see this calculation in action.

Now you can see that each cell of data has a total of 100% showing the split between Decaf and Regular drink sales.

Any questions at all, please don’t hesitate to get in touch. We love a challenge!

Need Expert Help?

See Our Full Menu of Data Services

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!