Categories
Meta Tableau

The hardest part about making dashboards for Tableau Public

Tableau Public is great. It’s a free option for data visualization developers to publish their Tableau work for the world to see. No matter if you’re a fresh, new developer or a seasoned expert.

Publishing to Tableau Public is great because it does a few things:

  • Let’s you work on you Tableau skills at home without spending $$$ on licenses
  • Gives you a community to participate in
  • Is a great way to help share and learn best practices and tips & tricks
  • Helps build a portfolio for potential employers or customers

I publish to Tableau Public every so often. Oftentimes I’ll share my works to LinkedIn and/or Reddit to get feedback and hopefully give new insights to viewers across the world. Doing this has often reminded me of a very important fact.

Feedback is a critical part of development.

This doesn’t just apply to Tableau Public. It applies to nearly all work. You need your alone time to brainstorm, develop, tinker, and fail. But you also need some sort of collaboration and feedback in order to make the best version of your product.

That’s why the lack of feedback while developing for Tableau Public can make development difficult. In an ideal development world, you get a few rounds of feedback. Without these iterations of feedback, development can be like a brutal empathy exercise. Trying to figure out what the opinions and thoughts of the end users without actually ever talking to them! Let’s break this down.

Challenges of feedback

  1. Knowing how often and when to get feedback.
  2. Finding experienced, truthful and knowledgable people to provide feedback.
  3. Understanding which recommendations to ignore and which ones to take action on. Experience helps with this one, but so does finding a great person for point 2 above.

Some ideas on how to establish a feedback loop for Tableau Public projects

Getting some sort of feedback loop can bring your dashboards to the next level. A great part of Tableau Public is that you can always open a dashboard you’ve published, edit it, and republish with the changes. I do this all the time when I want to make changes or test how something renders on different devices (**cough** **cough** fonts). So how can we establish a feedback loop so we can take advantage of this editing capability?

  • Get your spouse/roommate/friend/coworker to review your dashboard. Find out what they found hard to understand, if it was easy to use, and what they liked/didn’t like about the visual aspect. In person is great, at lunch is great, over video chat is great, any time and place it great! Just make sure your dashboard is configured for mobile if you’re doing it on the go.
  • Have regular chats with a mentor. If that mentor has Tableau experience, that’s awesome. But they don’t have to! A thoughtful mentor can give valuable insights regardless of their background. If you’re looking for a mentor, reach out to me. If you’re looking to mentor someone, also reach out to me (we all need mentors)!
  • Post your work publicly and ask for critique. This one you have to be careful with! Random internet strangers can be hit or miss. Some will type out “criticisms” without much thought or understanding. These should be ignored. But smaller communities and communities of respected colleagues, feedback can be invaluable. Think of places like LinkedIn, Meetups, small Facebook groups, etc.

Here’s my ideal feedback cycle (when to get feedback)

The first round of feedback is before you even start. It’s talking and asking questions with your target audience in order to nail down the KPIs, metrics, or business questions you want to answer with your work.

The second round is ideally after you’ve completed several mockups/potential solutions. Your target audience tells you what they like, what isn’t clear enough or useful, and you can gauge whether the audience is actually seeking what they’re asking for. (or really something tangentially related instead).

The third round would be after building the narrowed-down solution from the second round of feedback. In short, this is a post-beta version feedback round.

In the final round, this is where the least amount of changes would be requested and honored. At this point things should be pretty close to the desired outcome. Small changes might be done, but nothing drastic. If drastic changes are requested, then this is truly a new project and should be treated as one. That’s when you start back at round 1!


That’s it, thanks for reading!

Categories
Dashboards Data Tableau

Fails to Deliver and GameStop – A Look Inside

Note: Like what you see? I’m available for contract work! Reach out to me (407-906-6902) if you have an analytics project you’re looking to complete!

Click here to jump straight to the dashboard

You probably haven’t heard anything about GameStop in the past few years. Nope, nothing. Just a defunct retail chain where you used to be able to trade in your used video games for $3 a pop.

Sarcasm aside, the world was taken by storm a few weeks ago when GameStop stock went on a rally. With an exceptionally meteoric rise paired with high short interest, panic ensued for short sellers and smaller brokerages. This led to a rise in failures to deliver. In the most basic definition, this is one of the parties in a transaction did not deliver cash or the asset before the settlement date of the transaction.

Check out Investopedia’s definition below, and definitely read the page if you want to learn more about failures to deliver.

Whenever a trade is made, both parties in the transaction are contractually obligated to transfer either cash or assets before the settlement date. Subsequently, if the transaction is not settled, one side of the transaction has failed to deliver. Failure to deliver can also occur if there is a technical problem in the settlement process carried out by the respective clearing house.

https://www.investopedia.com/terms/f/failuretodeliver.asp

The SEC publishes data on failures to deliver twice every month. At the time of this posting, they had data released up to January 15th, 2021 (update: on Feb 16th I updated this with the SEC data up to January 29th, 2021). This unfortunately doesn’t capture the most extreme part of the GameStop stock price explosion, but captures other volatile periods in the stock’s history. I’ll update the visualization when the data becomes available.

In this dashboard, I wanted to see the correlation between price increases and fails to deliver. Also I was interested in seeing what the comparison was between the average of all stocks reported fails to deliver versus GameStop. Check out the visualization below to see what I came up with. It’s interactive and best viewed on desktop (but has a mobile configuration as well).

The Dashboard

p.s. if you know what stonks are then you know it’s not a misspelling. If not, don’t worry about it and enjoy the ride 🚀🚀🚀

One last note is that this project was a great way for me to practice my Python skills. SEC.gov provided the files in two week chunks, each as a zip file. I made a quick Python script to download all of the data for the last year, unzip the folders, append all of the text files to each other, and output a nice csv to use in Tableau. Python is a semi-frequent skill for me so it’s always nice to have a quick touch-up project like this.

If you’re looking to learn Python, a project like this is a simple way to learn a real world use. Don’t be afraid to jump into projects like this. Break it down into tiny steps and complete one at a time.

Thanks for reading. Any questions or comments? Feel free to reach out to me via email on my contact page.

Categories
Tableau Tips

My Top 5 Quick Tips for Speeding Up Development in Tableau Desktop

Making the leap from beginner to intermediate, and intermediate to expert in any skill requires attention to small details. This includes paying attention to nuances in the way the skill is conducted. Tableau development is no different. What are some ways that a Tableau developer can hop into the next echelon of skill? I’ve compiled five of my favorite quick tips to speed up your workflow and take development to the next level.

1. Using a template workbook for common formulas, dashboard layouts, etc.

Unfortunately (or fortunately), you’ll be doing a lot of the same type of stuff while building different workbooks in Tableau. Certain things are done in many dashboards, things like:

  • Certain calculations
    • Year-Over-Year
    • Year-To-Date
    • Month-To-Date
    • Percent difference
    • INDEX( )
  • Certain views
    • BAN (Big Ass Numbers)
    • Highlight tables
    • Customized maps
  • Dashboard layouts

There are a couple methods you can use with template workbooks to be more efficient. First, you can swap out the data source and replace fields with your desired data source fields in order to use the template workbook exactly as it is. Secondly, you can copy and past specific calculated fields, parameters, sheets, dashboards, and more from the template workbook into the target workbook.

This methodology really comes in handy when building more complex visualizations. Things like radial bar charts, Sankey diagrams, waterfall charts, etc. These can be time-consuming builds that aren’t frequently created, meaning it’s difficult to get efficient at building them.

2. Using the control key (or command key for Mac) to duplicate things and select multiple objects instead of the context menu

Did you know Tableau let’s you duplicate and select pretty much anything using the control/command key?

  • Press and hold it while clicking and dragging a pill in order to duplicate it.
  • Press and hold it while clicking and dragging a pill onto one of the marks cards (color, size, etc.) in order to duplicate it as a different mark attribute.
  • Press and hold it while clicking and dragging a worksheet to duplicate it.
  • Press and hold it while clicking and dragging a dimension in the data pane to the measure area in order to create a count of that dimension field.
  • Hold control/command while clicking on worksheets, fields, or pills to make bulk actions

3. Utilize context menus instead of the menu bar

You might be tempted to create and edit calculated fields, format specific fields or elements, and do other things using the menu bar. It’s more efficient though to use context menus in their localized areas.

For example, right click on a field in the data pane and then click “Calculated Field in the “Create” menu in order to have the context field inputted into the calculated field formula window. A parameter would be similar in function. Basically a contextually created parameter would be automatically configured with that field’s relevant values as the list of values for the parameter.

4. Drag and drop things instead of using context menus

This tip is usually targeted at beginners. To remove pills from the view, there is no need to right-click each pill and then click remove. Instead just click and drag the pill out of the view to remove it. Use control/command to select multiple elements (or shift to select multiple sequential elements) and drag them off the view to remove them.

On a similar note, you can drag and drop fields onto specific parts of the view (columns, rows, marks, filters, pages, etc.) in order to get the desired visualization. Double clicking a field to add it to the view and then moving the field around can be much less efficient.

5. Copy and Paste Formatting

Make a change to one of your bar chart views? Need those changes in all of your other bar chart views in the workbook? Don’t event think about repeating the formatting manually!

Tableau offers a great functionality to copy and paste formatting, just like in Excel. Simply right click the target worksheets.


That’s it, thanks for reading!

Categories
Dashboards Everything Else Tableau

2020 Presidential Election: Florida early and mail-in voting participation

Election day is closing in! Let’s take a look at one of the swing states current voting stats: Florida. Florida releases early voting and mail-in voting statistics on their Division of Elections site. I used that data to build a visualization of current trends.

I’d recommend using the visualization below by opening the 2016 Presidential election results (Trump vs. Clinton) and comparing the county results versus the voter participation so far for each party. Voters aren’t guaranteed to vote strictly along party lines, and small deviations from parties can have a big impact in small margin states like Florida. That being said, it can be telling to compare the current votes for each county by party to the results in 2016.

This next part is using numbers from October 30th. For example, Miami-Dade in 2016 had 623,006 votes for Clinton and 333,666 votes for Trump. Currently Democrats have 352k votes and Republicans have 269k votes in 2020. 225k unaffiliated voters have cast a ballot as well. This could mean several things (if we irresponsibly assume people 100% vote along party lines):

  • Republicans have already voted around 81% of their vote total from 2016.
  • Democrats have already voted around 57% of their vote total from 2016. Democrats have about 200k more registered voters in Miami-Dade, but if their participation doesn’t increase significantly, this could indicate an overall negative change in demographic voting for the party across the state.
  • If Republicans keep voting at this rate and the county gets around 75% voter participation, Trump will significantly outpace his 2016 total for Miami-Dade. In 2016 Clinton won Miami-Dade county by a margin of 29 points, but decreased Democratic turnout could narrow that margin significantly.
  • It still all comes down to the voters with no party affiliation. These voters make up 26% of registered voters in Florida, and nearly 33% of voters in Miami-Dade county.

With that in mind, take a look at my viz below! Make sure to hover and click to see additional information.


Interested in getting more posts like this? Subscribe below (I never share my email list with any 3rd parties).

Processing…
Success! You're on the list.
Categories
How-To Tableau Tips

Quick Tip: Filtering and Searching in Tableau’s Data Pane

Did you know that Tableau Desktop has the option to filter the data pane by field types on top of just their names? With the introduction of data models in Tableau Desktop, I see a lot of users frustrated with the seemingly crowded data pane. Before the data model, you used to have dimensions and measures in separate sections in the data pane, but now everything is grouped by tables of your data source. The good news is that Tableau actually still has an intuitive way to quickly see the fields you need.

As of 2020.3 you can filter your searches by 4 different queries:

C: filters for calculated fields
M: filters for measures
D: filters for dimensions
F: filters by comments

By typing C: or any of the other options at the beginning of your search, you’ll filter all of the fields based on that category. After the type filter, just put the field name you’re looking for to filter further.

There are technically two ways to filter your searches. You can manually type in the values above, or you can use the filter button located to the right of the search bar. Take a look at the GIF below to see.

Here we manually select the filter type using the button to the right.

That’s all there is to it! Tableau has some great documentation on further things you can do in the data pane as well, take a look: https://help.tableau.com/current/pro/desktop/en-us/datafields_dwfeatures.htm

This has been a quick tip that will hopefully make your Tableau Desktop development workflow a little easier. Make sure to check out the other quick tip articles to level up your development!


If you found this post helpful, subscribe below! I’ll be releasing some tutorial videos soon, and my subscribers will be the first to see them!

Processing…
Success! You're on the list.
Categories
Meta Tableau

Some awesome new features announced at Tableau Conference-ish 2020

This post will be relatively short. There were a few announcements at Tableau Conference-ish over the first couple days that are a huge deal for Tableau Desktop developers. These new feature announcements are certainly not exhaustive but are in my opinion, the highest impact.

Big map changes

Unlimited map layers

This means you aren’t limited to a single analysis that depends on size and/or color of map marks. This really opens up the number of options developers have in creating impactful and insightful maps.

This new feature might raise the question; how can you have multiple layers and a good user experience due to Tableau’s standard interactivity on worksheet?

You can now disable selections on maps

No more inadvertent highlighting and unwanted interactivity. Turn off selections in maps in order to provide a better user experience. This will greatly improve mobile UX due to the tapping and scrolling nature of mobile devices. This will avoid some common frustrations associated with the maps UX.

Reorder layers

With multiple layers, you’ll want to be able to control which one appears on the top. Tableau will be providing an easy way to drag and reorder map layers so that the desired layer order can be achieved.

Not map related, but probably the biggest news for beginner and intermediate developers: Tableau Desktop will write your LoDs

You read that right! If you’ve had trouble building level of detail calculations, Tableau is going to help out with that. You’ll be able to select dimensions and measures by holding control, right click, and click on “Create Level of Detail Calculation”. For more complex LOD calculations, this won’t be too big of a deal. But for people struggling to build these calculations, this functionality might bridge the gap between knowing about LODs and understanding LODs.


Enjoy the article? Subscribe to get notifications of new posts and visualizations.

Processing…
Success! You're on the list.
Categories
Tableau Tips

Quick Tip: Create and use custom color palettes in Tableau

Looking to speed up your dashboard development and add a personal touch to your dashboards? I’ve got a quick and easy tip for you. Make your own custom color palettes! Tableau Desktop allows you to modify the preferences file (found under My Tableau Repository and named Preferences.tps). You can open this file and modify its code to set up your own color palettes. Check out Tableau’s great documentation on how to set up these palettes here: https://help.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.htm

You can set up categorical, sequential, and diverging palettes to fit any type of dimension or measure you’re looking to add a specific color to.

This will take forever to set up a custom palette, how can I do this faster?

I’m glad you asked! If you have your color palette defined, skip this section. Otherwise, check out two awesome tools that help you generate Tableau tps files with custom palettes. These generators can take images, have predefined palettes, or allow you to build the palette one by one. Just keep in mind, there is a limit of 20 colors on a palette as of 2020.3.

All you’ve gotta do is download the generated tps file, replace your existing one in your “My Tableau Repository” (just make sure you don’t have any existing customizations in there).

Bonus tip: Set the default palette to dimensions or measures in the data pane.

For both dimensions and measures, you can set the default colors for each field so you don’t have to reconfigure it on each worksheet. By right-clicking on the field, you can go to the default properties and select “Color”. Check out the short GIF I created below to see that process.

How to set the default color property for a field

That’s it, hope you enjoyed the post!


I hope this makes your development a little more efficient and enjoyable. If you enjoy the content, subscribe below to get notifications of new blog posts. I might do a giveaway soon, who knows…

Processing…
Success! You're on the list.
Categories
How-To Tableau

Fixing Empty Spaces in Tableau’s Layout Containers: Part Two

You might’ve come across my previous post about fixing empty layout containers in Tableau. That post was about fixing a specific bug when everything else is configured correctly. This post is about a few common configuration issues that are usually the issue (before encountering the bug I’ve previously discussed). Go through these bullet points to make sure they’re configured correctly before trying other solutions.

The Problem

You have a horizontal or vertical layout container. But the elements don’t automatically size correctly. Either a gap is left at the end of the container, worksheets don’t swap like they’re supposed to, or the worksheets don’t fill up the container.

The Solutions

1. Make sure the elements aren’t set to Fixed Width or Fixed Height

By activating the objects inside the container, you can see if the width or height is fixed. The little push-pin will be filled in white if width or height is fixed, or have no fill if it’s a dynamic width or height.

Click on the push-pin to fix or unfix the width or height. You can use the dropdown menu below the push-pin icon to toggle this feature as well.

Something to keep in mind: You might not see the Fix Width or Fix Height option depending on your dashboard layout, and settings for the container. If you have “Distribute Contents Evenly” checked, these won’t show up. If your container is nested in other Tiled containers or multiple other containers, they might not show up either.

2. Activate each sheet in the container and set the sizing to Entire View, Fit Width (if a horizontal container), or Fit Height (if a vertical container)

Make sure each worksheet object is set to fit to the appropriate dynamic option. There are two places you can do this on the dashboard.

In the dropdown menu of the worksheet object:

The object’s menu has tons of useful configurations

Or in the bar at the top of the window:

This dropdown will work too

The following points are relevant if you’re doing a sheet swap

3. Hide all the titles of the worksheets

Right click all of the sheet titles in the container and hide them. If you need them to be there, create a text box with dynamic text based on which sheet is visible.

4. Make sure there is a discrete field on either your rows or columns for the sheets involved in the swap

Go back to the individual worksheets that are in your container. Make sure they have a discrete pill on rows or columns. This should be a static field with a single value and should be set as discrete. I use a static field with the value MIN(0) set as discrete. Then right click the field and deselect “Show Headers”. This will make the field disappear from the view.

Right click the pill and deselect “Show Header”

Processing…
Success! You're on the list.

If none of these options work for you, feel free to check out the older post that goes through the bug fix. And if that doesn’t work, reach out to me and I’d be happy to help you troubleshoot!


Did you find this content useful? Join the email list to get notifications of new posts.

Processing…
Success! You're on the list.
Categories
Tableau Tips

Quick Tip: Use the SIGN() function in Tableau for easy color indicators

If you’ve ever developed KPIs or BANs on a Tableau dashboard, there’s a chance you’ve also implemented color indicators for those numbers. Green being good, red being bad, and gray being neutral. This color indicator might also exist in your bar charts to show YoY changes or whether a goal was met for a specific metric. These indicator calculated fields can also be used to assign shapes like directional arrows, emojis, or any other shape. Whatever the case, there’s something I see beginners doing relatively frequently (and even some more experienced developers) that is additional work for no reason.

Using the Superstore data, it’s usually something like this:

Old Way to Color Things
IF SUM([Sales]) - LOOKUP(SUM([Sales]),-1) > 0 THEN "Increase"
ELSEIF SUM([Sales]) - LOOKUP(SUM([Sales]),-1) < 0 THEN "Decrease"
ELSE "Neutral"
END

or

IF SUM([Sales]) - LOOKUP(SUM([Sales]),-1) > 0 THEN TRUE
ELSEIF SUM([Sales]) - LOOKUP(SUM([Sales]),-1) < 0 THEN FALSE
ELSE NULL
END

The first version should be avoided because it uses strings in the calculated field. Strings perform slower than integers and booleans and will start impacting dashboard performance the more complex your data and dashboards get.

The second version isn’t too bad (and the equivalent using integers as the resulting values), but still makes calculations more verbose than necessary.

So how you should you achieve this desired indicator functionality?

Using the SIGN function you can achieve the same results with a single line.

New Way to Color Things
IF ZN(SIGN(SUM([Sales]) - LOOKUP(SUM([Sales]),-1)))

It automatically assigns a -1 for negative values, 0 for zero values, 1 for positive values and null for records that don’t evaluate. You can wrap the SIGN function around your entire calculation. On top of this, I would suggest wrapping that SIGN function with a ZN function like in the example. The ZN function will return the expression if it is not null, otherwise it returns a 0 value. Essentially this will eliminate null values from your SIGN function. Sometimes the null is desirable (you want to color specific marks that don’t evaluate) and sometimes you just want to color all null marks the same as zero.

Dashboard Example

The dashboard below is best viewed on a PC or tablet, but there is a mobile view for it as well.

What are the drawbacks?

Since you’re using a whole number as a data type, you can’t easily edit the aliases to make a human-readable string. Obviously making a human-readable string brings us back to the string data type which could negatively impact performance on large data sets. You could use the SIGN function calculated field in another calculated field to represent -1, 0, and 1 as your desired string. This isn’t the best to do either because now you’re nesting calculations and making the workbook a little more complex for the poor soul who inherits it in the future (very likely your future self).

One way to get around this is to just make a dummy legend that shows the color of the SIGN calculated field and what it pertains to (increase, decrease, steady). This won’t give a text value in the tooltip unfortunately, but that shouldn’t be necessary.

TL;DR

Use the SIGN function instead of IF ELSEIF functions to significantly reduce your calculation length. Wrap it with ZN if you only want three indicators (-1, 0, 1) or don’t wrap it with a ZN function if you want four indicators (-1, 0, 1, and NULL).

Pros: Simpler and less verbose calculated field, whole number data type for better performance than strings

Cons: Results in whole number so can’t directly alias


I hope this makes your development a little more efficient and enjoyable. If you enjoy the content, subscribe below to get notifications of new blog posts. I might do a giveaway soon, who knows…

Processing…
Success! You're on the list.
Categories
Tableau Tips

Top 5 Quick Tips for Better Tableau Dashboard Performance

There are hundreds of blog posts, articles, and checklists about improving Tableau dashboard performance. I personally don’t like reading through lengthy posts, watching long videos, or drilling through checklists just to have a list of 100 things to check. So I’ve compiled the five most impactful performance tips to make your dashboards run faster instantly.

1. Change data sources from Live to Extract

If you don’t absolutely have to use a live connection, don’t. Tableau’s Hyper is a best-in-class data engine, use it. You’ll see faster dashboards instantly in 90% of cases.

2. Minimize the number of marks on your dashboard

500,000 marks on your map of the United States is going to take a few seconds. 500,000 marks that use calculated fields is going to take even longer. Only show the most relevant data and know what to exclude. This means not dragging every dimension in your data onto the canvas.

3. Simplify your calculations, remove or reduce nested calculations

If you’re referencing a calculated field in a calculated field, your performance will degrade. Once your data gets to a certain size and your 5 nested calculations deep, you can kiss your UX ratings goodbye. If you can, try to reference terminal fields in a calculation, even if that means making one big calculation. Just pay attention to your aggregations and order of operations.

Use REGEXP for string calculations if you can. By doing this you avoid Tableau having to do something like a CONTAINS calculation multiple times.

If you can’t use REGEXP formulas, use CASE expressions rather than massive IF statements with a bunch of ORs.

Check out Tableau’s official documentation if you want to learn more: https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_bestpractices.htm

4. Reduce the number of worksheets on your dashboard

Either split off your worksheets into different dashboards, or find a different way to communicate your message with less worksheets. The more marks and worksheets on your dashboard, the more processing Tableau has to do. Aim for 5 or less as a rule of thumb.

5. Use filters, not too much, and don’t set them all to “relevant values”

Ok, so this one is probably the most difficult for me to follow when building. But it’s easy to remove filters for a quick performance boost. If the filter doesn’t absolutely need to be there, get rid of it. If it doesn’t have to be relevant, don’t make it “relevant values”. It just adds to what Tableau has to calculate and render, which adds precious seconds to load time (especially with large data sets).

I hope this gave you a quick win in making your dashboards faster. Have any other really quick tips to make Tableau faster? Feel free to comment them below, I’d love to learn.


Enjoy the content? Subscribe below to get notifications of new blog posts. I might do a giveaway soon, who knows…