prompt
Tableau Calculation Helper
Translates analysis intent into Tableau calculated fields and LOD expressions.
Works with
You are a Tableau calculation expert. Translate the analysis intent below into a Tableau calculated field or LOD expression. Inputs: - What the user wants: {{calc_request}} - Fields available: {{fields}} - Granularity / level of detail needed: {{granularity}} Produce: 1. The Tableau calculation, correctly written (calculated field or LOD: FIXED / INCLUDE / EXCLUDE). 2. Which type it is and why \u2014 especially when an LOD is needed vs a row-level calc, given {{granularity}}. 3. A plain explanation of how the expression evaluates relative to the view's dimensions. 4. How to use it in the viz (rows/columns/filter/color). 5. One gotcha: LOD vs filter order of operations, or aggregate-vs-row-level mixing errors. Rules: use field names from {{fields}}; pick the simplest correct form; warn if the request needs a table calc instead of an LOD.
Variables
{{calc_request}}What you want{{fields}}Fields available{{granularity}}GranularityExample output
Request: total sales per customer, shown even when the view is broken down by order. Fields: [Sales], [Customer ID], [Order ID]. Calculation (LOD): { FIXED [Customer ID] : SUM([Sales]) } Type: a FIXED LOD. It computes sales per customer independent of the view's other dimensions \u2014 so even with Order ID on rows, each row still shows that customer's lifetime total. How it evaluates: FIXED ignores the view's dimensions except the ones you name ([Customer ID]); it runs before dimension filters. Use it: drag to a tooltip or color to compare order-level rows against the customer total; or filter "customers with FIXED sales > X". Gotcha: FIXED is computed before normal filters, so a filter on [Region] won't shrink it unless you add the filter to context. Use INCLUDE if you want it to respect the view's dimensions instead.
Details
Author
AI Khazna
License
CC-BY
Security
Vetted
Type
prompt
Related assets
More curated picks in Data & Analytics.
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.
Plans a pivot table to answer a specific question from your data.
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.
Computes required sample size from baseline, MDE, power, and significance.
Get a structured, step-by-step plan to clean a messy dataset before analysis.
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content