TGViewer
Data Science & Machine Learning Data Science & Machine Learning @datasciencefun · 77.8K subscribers
Post #4316 3.27K
✅ 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!
  • ❤ 8
  • 🥰 1
More from @datasciencefun
  1. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  2. Oct 9, 2026Post #4657
  3. Oct 9, 2026🇮🇳 𝗚𝗢𝗩𝗘𝗥𝗡𝗠𝗘𝗡𝗧 𝗢𝗙 𝗜𝗡𝗗𝗜𝗔 — 𝗔𝗜𝗖𝗧𝗘 𝗜𝗡𝗧𝗘𝗥𝗡𝗦𝗛𝗜𝗣𝗦 𝟮𝟬𝟮𝟲 🚀…
  4. Oct 8, 2026🔬 Kandinsky 6.0 Video: Training Details and Architecture The new Kandinsky 6.0 Video line…
  5. Oct 8, 2026🎓 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗙𝗥𝗘𝗘 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝘄𝗶𝘁𝗵 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗲𝘀! 🚀🔥 Upgr…
  6. Oct 7, 2026ORDER BY salary DESC LIMIT 5; Mistake 3 — Forgetting that LIMIT applies after sorting For…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →