How I used collapsible sheets to build a virtual escape room with Tableau!

Chapter I - The idea

I love playing escape rooms; solving problems is something my mind revels in. And I am not too bad at it, if my friends are to be believed. They once watched and listened to a whole room I was playing in, and their feedback at the end was: “If you stopped listening to Tarek, who is absolutely clueless, and paid a bit more attention to what Jérémy was saying, you’d probably have been out 10 minutes ago”. It was more meant as a dig to my friend than an actual praise of my skills, but I’ll take it anyway.

This episode happened in Vilnius, Lithuania, during one of my friends’ yearly ‘blind destination trips’. How does that work? After realising how difficult it was to have 8 grown-ups agree on anything, we decided that two of us would plan everything and the other 6 will just happily show up with what they’ve been asked to bring. Each year, we’ll change the pair of organizers and enjoy another “zero-planning” trip. The most fun is the destination being kept secret until the very last moment; usually revealed when the organisers stop in front of a gate at the airport.

Early 2020 - when I didn’t have to hide my moustache behind a mask in public - it was my turn to plan something. We quickly settled on the concept: a short ski trip to nearby France. But keeping the destination a surprise while telling everyone to pack their ski boots wasn’t going to cut it. We didn’t want to tell everyone: “We’re going to ski, yeah!” either. So, as we remembered that escape room moment, we decided to have them work their way through a set of enigmas and private jokes to find out the destination. After realising how bad both of us were at setting up a small website to do so, I decided to give it a go with Tableau.



Chapter II - The concept

The dashboard would be published on Tableau Public and would consist of a single screen with an enigma to resolve and a text box to provide answers. Answering correctly would bring up another enigma on the same screen, until the final enigma is resolved and the final destination revealed.

From a Tableau perspective, this answer box would simply be a string parameter, set up as “Type in”.

Type In Parameter
Each enigma will have its own worksheet, where the enigma will be displayed. The main feature is to dynamically show only the current enigma/worksheet while hiding the other ones.
To achieve such a feat, I used a technique called “collapsible sheets”.

Here is how to set it up: first, let’s place all the enigma worksheets within one vertical container. Make sure to have them fit the entire view, hide titles, do not fix their height nor “Distribute Evenly” within the container (see left hand-side of the picture below). From there, if a worksheet is filtered in a way that no records can be returned, it will be empty and will therefore collapse, letting other sheets within the container occupy more space (see right hand-side of the picture below).


Collapsible sheet example


All we have to do is to put a filter in place so that all sheets bar one would always collapse. In my case, I am using a calculated field to assess whether the answer provided - the parameter value - matches the answer for the previous enigma, meaning that the solution has been found and the next question should be revealed.

By the way, don’t try to make sense of the enigma descriptions in the above image; this is just some random text from, a dummy text generator that provides “hipster” words rather than the eternal lorem ipsum. And yes, there is one for cat lovers too.


Chapter III - The mistakes

The most difficult part isn’t to come up with enigmas, but to actually anticipate answers and most importantly, mistakes. Here are a few things to bear in mind.

First of all: we are using a text parameter as a way to check whether an answer is valid; which means one typo or a different case might not be recognized as correct. We need to treat the answers provided with extra care:

  • Use the UPPER() function on the parameter in combination with having all answers in “all caps” to avoid case-sensitive issues.

  • Use the TRIM() function to remove any leading or trailing space.

  • Use OR function if more than one answer could work; e.g. a word could be written in multiple ways, or a date could be written in a different format.

The second thing to remember is that an answer to an enigma will show the next enigma; but technically, someone could by mistake provide the final answer while trying to answer the first question and bypass the whole game. There isn’t a mechanism to check whether intermediate answers have been provided (even though it could be done with parameter actions, but that would be another blog post).

  • Make sure the expected answers are different enough so a wrong answer cannot be the solution to another enigma. A good way to achieve that is to mix different types of answers: char, string, date, long number, short number, ...

  • This also means that you should be really careful when using the CONTAINS() function; if the answer is short enough, it can easily be present in multiple incorrect answers to previous enigmas; creating false positives.

The last thing to foresee is a help page for any unforeseeable incorrect answers. You’ll want to avoid having all sheets collapsing at the same time when the answer provided does not resemble anything that you might have anticipated, leaving the player with an empty screen without instructions.

  • Create an extra worksheet with some instructions mentioning that the provided answer is incorrect and the player should enter the last correct answer to go back to the current enigma. This page should only be displayed when no others are, so the filter this time is to check whether the answer is different from every single correct answer in the whole game.

Chapter IV - The fun

Now that we have the basic mechanism, the fun really starts. You can use your imagination along with the full extent of your Tableau knowledge to build enigmas. Using text or shapes will work nicely to frame any enigma, but here are a few ideas to spice things up:

  • hide an answer in a viz in tooltip

  • use color to mean different things

  • have a slider (parameter) reveal another sheet with clues when the right parameter value is selected

  • use a show/hide button to also provide an extra clue

  • anticipate some wrong answers and provide a dedicated screen for them, pointing out what was wrong, so that the resolution must be done in two steps

  • there are so many options.

The one thing that was missing from my game, and I couldn’t build in Tableau, was the ability to record the time spent trying to solve the game. Here is how I achieved this:

  • The first thing you’ll see opening the app is a link to a Google Form, where I am quickly asking the player to submit their name and who’s playing with them. After submission, a code will be visible (you can change the default “thank you” message in settings / Presentation / Confirmation message). From there, they have the answer to the first enigma, and I know their form submission time.

  • Once they reach the end of the game, there would be another Google Form link asking for a bit of feedback on the game, which would also record the form submission time. Unfortunately, one of my friends never made it thus far (yes, it was Tarek), giving up despite multiple clues. Most cracked the full thing within an hour.

At the end of the day, as I kept thinking about new features to be added to the game, I realised how versatile Tableau can be. I don’t think I’ll design a virtual Escape Room game for one of our clients anytime soon, but this challenged me and forced me to use several Tableau “hacks” that will be very helpful in the future, collapsible sheets being one of them.

Oh, I guess you want to play now? The original game is full of private jokes, so it wouldn’t make sense for you to play it. But I’ve put together a very light version if you’d like to have a go. Can you crack the code?

- Jérémy

Jérémy Calloud

Jérémy Calloud

I help you get insights from your data. Easier. Faster.

Read more articles of this author
Let's discuss your data challenges

Join our community of data enthusiasts

Get industry insights, expert tips and Biztory news sent straight to your inbox with our monthly newsletter.