# Understanding the grain of your data in Tableau

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2021-03-17
- **Format:** Video · 13 min watch · transcript available
- **Topics:** Data visualisation, Data prep
- **Tools:** Tableau (data modelling, lod expressions, relationships)
- **Canonical:** https://just-tim.com/posts/understanding-the-grain-of-your-data-in-tableau
- **Watch:** https://youtu.be/PT7CpojBEps

I take a tangent from functions to explain granularity, or the grain, of your data in Tableau using the American Superstore dataset. I show how to investigate the level of detail using the summary window and data model, and why Tableau aggregates at the row level you set.

## Key takeaways

- The Orders count field actually counts rows in the Orders table, not distinct orders, so a single order can span multiple product rows
- Superstore operates at the product level of detail, meaning each row is a product within an order rather than the order itself
- Average sales in Tableau is really the average product value, calculated as total sales divided by the number of rows in the dataset
- To get the true average order value you divide total sales by the distinct count of orders, which differs from the default average
- Each logical table in the data model can have its own grain (Orders at product level, Returns at order level, People at regional level), and Tableau handles the aggregation across relationships

## Chapters

- 0:00 Why granularity matters
- 0:29 Exploring the Superstore data
- 2:56 Using the summary window
- 4:03 Detail at the product level
- 5:48 Averages and the level of detail
- 8:45 Finding the true average order value
- 9:53 Grain across data model tables
- 11:34 Recap and what's next

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/understanding-the-grain-of-your-data-in-tableau

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
