Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Tableau 2020 - Fourth Edition

You're reading from  Learning Tableau 2020 - Fourth Edition

Product type Book
Published in Aug 2020
Publisher Packt
ISBN-13 9781800200364
Pages 576 pages
Edition 4th Edition
Languages
Author (1):
Joshua N. Milligan Joshua N. Milligan
Profile icon Joshua N. Milligan

Table of Contents (19) Chapters

Preface 1. Taking Off with Tableau 2. Connecting to Data in Tableau 3. Moving Beyond Basic Visualizations 4. Starting an Adventure with Calculations and Parameters 5. Leveraging Level of Detail Calculations 6. Diving Deep with Table Calculations 7. Making Visualizations That Look Great and Work Well 8. Telling a Data Story with Dashboards 9. Visual Analytics – Trends, Clustering, Distributions, and Forecasting 10. Advanced Visualizations 11. Dynamic Dashboards 12. Exploring Mapping and Advanced Geospatial Features 13. Understanding the Tableau Data Model, Joins, and Blends 14. Structuring Messy Data to Work Well in Tableau 15. Taming Data with Tableau Prep 16. Sharing Your Data Story 17. Other Books You May Enjoy
18. Index

Aggregate calculations

We've already considered aggregations such as sum, min, and max in Tableau. Often, you'll use fields as simple aggregations in the view. But sometimes, you'll want to use aggregations in more complex calculations.

For example, you might be curious to explore the percentage of the rent that was discounted. There is no such field in the data. It could not really be stored in the source, because the value changes based on the level of detail present in the view (for example, the percent discounted for an individual unit will be different to the percent discounted per floor or per building). Rather, it must be calculated as an aggregate and recalculated as the level of detail changes.

Let's create a calculation named Discount % with the following code:

SUM([Discount]) / SUM([Rent]) 

This code indicates that the sum of Discount should be divided by the sum of Rent. This means that all the values of Discount will be added, and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}