Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Tableau 2021

You're reading from   Mastering Tableau 2021 Implement advanced business intelligence techniques and analytics with Tableau

Arrow left icon
Product type Paperback
Published in May 2021
Publisher Packt
ISBN-13 9781800561649
Length 792 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
David Baldwin David Baldwin
Author Profile Icon David Baldwin
David Baldwin
Marleen Meier Marleen Meier
Author Profile Icon Marleen Meier
Marleen Meier
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Getting Up to Speed – A Review of the Basics 2. All About Data – Getting Your Data Ready FREE CHAPTER 3. Tableau Prep Builder 4. All About Data – Joins, Blends, and Data Structures 5. Table Calculations 6. All About Data – Data Densification, Cubes, and Big Data 7. Level of Detail Calculations 8. Beyond the Basic Chart Types 9. Mapping 10. Tableau for Presentations 11. Visualization Best Practices and Dashboard Design 12. Advanced Analytics 13. Improving Performance 14. Interacting with Tableau Server/Online 15. Programming Tool Integration 16. Another Book You May Enjoy
17. Index

Implementing Python functionality

Just like R, TabPy makes use of the script functions in Tableau. In the next sections, we will practice working with TabPy and will look at multiple use cases. Tableau calculations using TabPy look very similar to R's. For TabPy, it is important to add a return statement in the calculated field and notice that arguments are noted with an underscore instead of a dot:

Figure 15.30: Python TabPy syntax

This will be manifested in the next exercises; we will first look into random number generators.

Random and random normal

Many calculations are easily accessible via the calculated fields, others via the table calculations—and then there are some hidden functions. If you tried to find the function Random for example, you wouldn't. But you can still use the Random() function as can be seen here:

Figure 15.31: Random

Another option is, using TabPy to get the Random function. We will look at random as well...

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 $19.99/month. Cancel anytime