Search icon CANCEL
Subscription
0
Cart icon
Cart
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
Arrow up icon
GO TO TOP
Data Modeling with Tableau

You're reading from  Data Modeling with Tableau

Product type Book
Published in Dec 2022
Publisher Packt
ISBN-13 9781803248028
Pages 356 pages
Edition 1st Edition
Languages
Author (1):
Kirk Munroe Kirk Munroe
Profile icon Kirk Munroe
Toc

Table of Contents (22) Chapters close

Preface 1. Part 1: Data Modeling on the Tableau Platform
2. Chapter 1: Introducing Data Modeling in Tableau 3. Chapter 2: Licensing Considerations and Types of Data Models 4. Part 2: Tableau Prep Builder for Data Modeling
5. Chapter 3: Data Preparation with Tableau Prep Builder 6. Chapter 4: Data Modeling Functions with Tableau Prep Builder 7. Chapter 5: Advanced Modeling Functions in Tableau Prep Builder 8. Chapter 6: Data Output from Tableau Prep Builder 9. Part 3: Tableau Desktop for Data Modeling
10. Chapter 7: Connecting to Data in Tableau Desktop 11. Chapter 8: Building Data Models Using Relationships 12. Chapter 9: Building Data Models at the Physical Level 13. Chapter 10: Sharing and Extending Tableau Data Models 14. Part 4: Data Modeling with Tableau Server and Online
15. Chapter 11: Securing Data 16. Chapter 12: Data Modeling Considerations for Ask Data and Explain Data 17. Chapter 13: Data Management with Tableau Prep Conductor 18. Chapter 14: Scheduling Extract Refreshes 19. Chapter 15: Data Modeling Strategies by Audience and Use Case 20. Index 21. Other Books You May Enjoy

Pivoting rows to columns

In this section, we will explore pivoting rows to columns. There are instances when our data sources have multiple, conditional fields contained in the same column. This structure of data will cause problems because Tableau likes every column to be a unique field. If we look at the structure of our Bad Measures.xlsx file, as shown in Figure 5.7, you can see that there is a column called Measure and another column called Value. The ideal data structure would have four columns, one for the date and one each for sales, profit, and volume:

Figure 5.7 – The Bad Measures file

Figure 5.7 – The Bad Measures file

If we don’t pivot these rows to columns, analysts using Tableau Desktop don’t have an easy way to create views and dashboards in Tableau. The best they could hope for is to create three calculated fields, one for each of the measures, as shown in Figure 5.8:

Figure 5.8 – Result of calculated fields

Figure 5.8 – Result of calculated fields

This approach...

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 ₹800/month. Cancel anytime