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
Mastering Tableau 2023 - Fourth Edition

You're reading from  Mastering Tableau 2023 - Fourth Edition

Product type Book
Published in Aug 2023
Publisher Packt
ISBN-13 9781803233765
Pages 684 pages
Edition 4th Edition
Languages
Author (1):
Marleen Meier Marleen Meier
Profile icon Marleen Meier
Toc

Table of Contents (19) Chapters close

Preface 1. Reviewing the Basics 2. Getting Your Data Ready 3. Using Tableau Prep Builder 4. Learning about Joins, Blends, and Data Structures 5. Introducing Table Calculations 6. Utilizing OData, Data Densification, Big Data, and Google BigQuery 7. Practicing Level of Detail Calculations 8. Going Beyond the Basics 9. Working with Maps 10. Presenting with Tableau 11. Designing Dashboards and Best Practices for Visualizations 12. Leveraging Advanced Analytics 13. Improving Performance 14. Exploring Tableau Server and Tableau Cloud 15. Integrating Programming Languages 16. Developing Data Governance Practices 17. Other Books You May Enjoy
18. 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 to the calculated field and notice that arguments are noted with an underscore instead of a dot:

Figure 15.31: Python TabPy syntax

This will be manifested in the next exercises; we will first investigate 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. Hidden because those are not (yet) fully supported or tested; therefore, use them with care. If you tried to find the function Random, for example, you would not be able to. But you can still use the Random() function, as can be seen here:

Figure...

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}