Tableau: keeping results independent of view / filter

I am using Tableau Desktop 2021.1.4

Suppose that my source sales data consists of 4 columns Region (dimension with values: N,E,W,S), Type (dimension with values: Furniture, Electronics, Appliances), Year (dimension with values: 2021, 2020, 2020), and sales ($).

I would like to generate a Calculated Field, say Sum of Sales, where the summation:

  1. is always over all the regions and all the types, regardless of what is in the view
  2. can also be over the different years or can be filtered by year

I thought:

{Exclude [Region], [Type]:
    sum([Sales])
}

would do the trick, but, for example, when the view is: [Region][Type] in the Rows and [Year] in the Columns, and I filter the region, Sum of Sales becomes smaller accordingly.

Topic aggregation tableau

Category Data Science


Consider using FIXED Level of Detail Expressions, and see this information on Filters and Level of Detail Expressions.

FIXED could also be combined with adding filters to context:

FIXED calculations are applied before dimension filters, so unless you promote the fields on your Filter shelf to Improve View Performance with Context Filters, they will be ignored.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.