Book Image

Creating Data Stories with Tableau Public

Book Image

Creating Data Stories with Tableau Public

Overview of this book

Table of Contents (18 chapters)
Creating Data Stories with Tableau Public
Credits
About the Author
Acknowledgments
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Window versus running functions


We have briefly discussed the WINDOW functions already. There's also another type of function, called the RUNNING function. The WINDOW functions have specific partitions, that is, they measure either the whole table, pane, or cell, or from a specific number of previous or future values. Alternatively, the RUNNING function compares all the values before the current value in the partition.

In the following example, we graphed the average percentage of the GDP that was from high-tech exports by region and by year in the World Development Indicators data source. This is a simple spark bar graph. We have hidden the header for the y axis in this graph.

We created a calculated field that, for each year, tests whether the average High Tech Exports as a percentage of the GDP is equal to the running maximum, that is, is the value for any year higher than all the years before it. The results are true and false, as shown in the following screenshot:

The RUNNING_MAX function...