Assign Color to Non-Existing Values in Tableau

The Issue:

I recently ran into the issue of not being able to color a dimensional value because my data did not yet contain that specific value. What I learned through trial and error is that I needed to change the calculated field I was using to force an expected value so I could color it appropriately.

I then had to change my calculated field back to what it was originally and hope that Tableau would remember the color. It would be nice if Tableau had a native built in interface to allow users to assign colors to expected values (regardless if the values are currently in the data), but this feature is not available in Tableau (looking at you very talented developers at Tableau).

Watch the Solution:

I created a calculated field with expected outcomes of “Bad”, “Normal” and “Great” based upon numerical profit data. The profit data I had did not support the “Great” value. Thus I had to doctor my calculated field to force the value and then color it. I didn’t know if Tableau would remember my color selection if I changed the calculated field and then changed it back, but it did.

The Forums:

Don’t worry, you are not the only one looking for a solution to this issue. Here are some Tableau forum links that basically ask the same questions.

Hopefully this post helped you in your search to color those non-existing values. For many of us, not all potential values are available in our data sources, and we many not have access to the underlying source data. Having a nice UI means to assign expected values in advance would be extremely useful.

The Dashboard:

I certainly love to develop new dashboards to test out functionality. I built this one to test out a few Ryan Sleeper dashboard tips. Make sure to download the dashboard .twbx file from from my Tableau Public profile (Anthony B Smoak) for free!

Please like and subscribe on the Anthony B. Smoak YouTube channel.

All views and opinions are solely my own and do not necessarily reflect those my employer

Do Great Things with Your Data!



Create Tableau KPIs Quick and Easy (Profit vs Budget)

In this video you will learn a quick and easy approach to putting together KPIs that illustrate how profits perform in relation to a budget (i.e., targets vs actuals). Of course the KPIs will be interactive thanks to help from parameters.

Now the dashboard that I built around the KPIs will definitely form the basis of additional videos. There are several techniques here (filtering viz in tooltips, show/hide container, bar in bar chart, reset all filters button, etc.) that form the basis of a good intermediate level dashboard.

Inspiration comes in many forms. I have to give a shoutout to Keith Dykstra for offering his original dashboard for reverse engineering. The idea for the KPIs and bar in bar chart are inspired by Keith. I added additional elements such as the reset all filters button, filtering by states via treemap, parameters in lieu of hover over images.

Shoutout to the Kevin Flerlage for his great PowerPoint button workbook. I modified the on/off toggle button based upon a template from Kevin’s workbook.

Finally, I was watching an Oregon vs UCLA football game one Saturday and was impressed by Oregon’s latest uniform combination. I had to throw that grey and green combination together for use on the dashboard. Inspiration can come from many places! Here’s a little Oregon football and my “Saturday Night Lab” tweet.

Make sure you watch this video to learn and hopefully get inspired yourself!

If you’re interested in KPIs you can check out these other videos:

All views and opinions are solely my own and do NOT necessarily reflect those my employer.