✅ Tableau Calculated Fields
What are Calculated Fields?
Custom formulas you create in Tableau to do calculations beyond default aggregations. Think: Excel formulas inside Tableau.
Why use them?
1. Create new metrics like Profit Margin, YoY Growth
2. Categorize data: High/Medium/Low sales
3. Date math: Days between orders, fiscal periods
4. Conditional logic: IF/THEN/ELSE rules
Basic Syntax
IF [Sales] > 10000 THEN "High" ELSE "Low" END
[Profit] / [Sales] → Profit Ratio
DATEDIFF('day', [Order Date], [Ship Date])
Key Functions
Logical: IF, IIF, CASE
Math: ROUND, ABS, SQRT
Date: YEAR, MONTH, DATEDIFF
String: LEFT, RIGHT, CONTAINS
Pro Tips
1. Calculated fields compute row-level or aggregate depending on formula
2. Use ATTR() to avoid aggregation errors
3. Name fields clearly: Profit Margin % not Calc1
4. Test with a few rows before using in dashboards
👉 Tableau Resources: https://whatsapp.com/channel/0029VasYW1V5kg6z4EHOHG1t
💬 Tap ❤️ for more!
Post #4316
3.27K
- ❤ 8
- 🥰 1