Pep Talk Generator: Life is hard, giving yourself a pep talk doesn’t have to be.

Growing up, my dad gave me the best pep talks. One of his favourties was “Keep your stick on the ice.” Not surprising given his lifelong love of hockey. My Dad passed in 2013, and I miss his pep talks. This pep talk generator helps to partially fill that void, and it is one way I can share the joy he found in lifting others up.

So, let’s get down to the Tableau part, shall we? Building this pep talk generator in Tableau required using a variety of Tableau techniques — here’s a peek under the hood:

Each pep talk is composed of four separate string values. This gives the dashboard over 100,000 possible pep talk combinations. To offer the choice between the create your own pep talk or randomly generated pep talk, I employed parameters & calculated fields. There are four string calculations for the create your own and another four calculations for the random version.  For those of you keeping score at home, that makes eight calculations.

Pretty straight forward so far, agreed? Feel free to download the workbook from Tableau Public and follow along if you wish!

Both versions of the pep talk generator – create your own and randomly generated – use parameter values in the string calculations to change the text that is shown. Create your own has four parameters, one for each string calculation. Random also has four parameters, one for each string calculation. (Add 8 parameters to the score sheet!) However, the method by which these parameter values are updated differ. Let me explain:

For the Create Your Own version, the values in the parameters are updated using Tableau’s parameter control boxes, which are visible to the dashboard user.  In other words, when the dashboard user interacts with the parameter control box, the value in the parameter changes and updates the string calculation for that portion of the text.

The randomized version also uses four parameters, one for each string calculation, however, these parameters update when the workbook is opened using a different set of calculations. The “default when workbook opens” calculations utilize the function RANDOM() to randomly assign a value between 1-18. 

For those of you keeping score at home, we now have 12 calculations and 8 parameters. Could this be done with fewer calculations? Yes, probably. In fact you could combine the string calculations and thereby reduce the number of calculations, but I prefer having simpler, shorter syntax over nested calculations.

Now that we have the mechanism by which both sets of string calculations will update, and we can use these calculations to build the sheets by placing them on the text marks card. I used two separate sheets, one for the create your own pep talk, and a second one for the random version. I also built two more sheets which I named “button random” and “button create your own” that are used on the dashboard to toggle between the two versions.

You may be wondering how does the dashboard know which sheets to display? Dynamic Zone Visibility and Parameter Actions, FTW!  To employ these techniques, the dashboard utilizes another parameter with two values: Random or Create Your Own, to identify the components needed for each version. The components are as follows:

> four sheets: randomly generated text, create your own text, button random, button create your own

and

> four parameter control boxes that drive the create your own version

On the dashboard, you must assign the “Control visibility using value” to each component, or in the case of the parameter control boxes, the container that holds the components. Lastly, parameter actions drive these components (aka zones) to update dynamically when the dashboard viewer clicks on the “button” sheets. Naturally, there are a few more calculations needed to achieve this functionally, as well calculations for formatting the tooltips – all in, the total number is 22 calculations and 9 parameters! It sounds like a lot, but with consistent naming and a well-laid out plan, the dashboard build is very do-able.

I hope this Pep Talk Generator lifts you up and gives you the motivation to keep going. And if you know someone that needs a pep talk, please pass it on. http://tinyurl.com/peptalkgenerator

Viz built by: Sarah Pallett. Inspiration: David Pallett

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑