0
$\begingroup$

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.

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.