|
|
Fixed Tableau Calculation [best] DirectFIXED [Category] : SUM([Sales]) → Category total. Then create: SUM([Sales]) / [Category Total] . Now, even if you filter to East region, the denominator stays the Category total across all regions. 2. Cohort Analysis (Customer’s First Purchase Date) Problem: You want to tag each transaction with the customer’s first order date to analyze retention by cohort. Enter the . To respect worksheet filters, convert relevant filters to Context Filters (right-click → Add to Context). FIXED will then respect them. FIXED vs. INCLUDE vs. EXCLUDE – Quick Cheat Sheet | Expression | What it does | Best for | |------------|--------------|-----------| | FIXED | Ignores current view dimensions | Row-level comparisons, cohort tagging | | INCLUDE | Adds dimensions to the aggregation | “Show sales by region AND product” | | EXCLUDE | Removes dimensions from the aggregation | “Remove month to get quarterly total” | fixed tableau calculation FIXED [Customer Name] : SUM([Sales]) → This calculates total sales per customer , no matter whether you’re looking at Year, Product, or Region in your worksheet. When Should You Use FIXED? (3 Real-World Use Cases) 1. Percent of Total (by a specific group) Problem: You want to show each product’s sales as a % of Category total , even if the user filters to a specific region or year. FIXED [Category] : SUM([Sales]) → Category total FIXED is the most powerful—and often misunderstood—calculation in Tableau. Unlike its cousins (INCLUDE and EXCLUDE), FIXED operates of your worksheet’s filters and dimensions. It says, “Compute this value at this specific level, and I don’t care what else is on the view.” To respect worksheet filters, convert relevant filters to
|