A Mystery.
Or perhaps a Perplexment.
In the Workbook shown here, where does Parameter 1 come from? Why is it there? What use is it? What can be done with, for, and to it?
We're used to seeing Parameters listed in their own panel in the Data Window, but there is no such panel here.
This is one of those odd corner cases in Tableau that causes one to stop and wonder: "Now what on earth is going on here, and how did it happen?"
A Challenge.
Without looking below (no peeking), create a Tableau Workbook just like the one shown, with its own phantom Parameter. It's really not all that hard. Maybe.
Well, yes, it's odd, but does it really matter? If so, why?
This situation is problematic because it sits outside normal Tableau space—that set of configurations and behaviors that constitute the standard Tableau interface. By presenting an abnormal configuration that confounds expectations Tableau confuses the user, which in turn leads to, at least: time wasted in trying to recover from the situation (even if it's not strictly a fault or problem); effort and energy spent trying to understand what's happened, and why (some users won't care, some will dig into it until the mystery is fully solved); and a sense of mistrust, a suspicion that Tableau isn't as simple, straightforward, easy, and reliable as it could be. It's the accretion of these elements that ultimately undermines the whole product.
Why bother?
Why should I—or you—spend any time figuring out what's going on here? Particularly if it's not really a going to cause Tableau to crash, do something erroneously, or be a major usability problem.
Fair question. I've found that chasing down these rabbit holes reveals a lot about Tableau, how it's put together and how it works, and this deeper understanding leads to being able to use it better. And it's fun, in the way puzzling things out is.
Creating your own Phantom Parameter. It's really not all that difficult, just follow these easy steps.
Open a new Tableau workbook.
You don't have to name it, although I did here, and it's a good practice.
As with all new workbooks there are no data connections, no dashboards, no parameters, and only the initial "Sheet 1" worksheet.
To this we'll add a single parameter, which will exist all by itself.
But not just yet.
Tableau doesn't provide any way for us to create or otherwise interact with Parameters in an empty workbook.
1. The Analysis menu's "Parameters" option is inactive.
2, 3. Right-clicking in either the Dimensions or Measures panel of the Data Window is the normal route to creating a Parameter.
As we see here, in the absence of any Data Connections, the right-click menu only offers the "Paste" option. (and it's not entirely clear at this point what can be pasted)
There's a reason for this behavior, which I'll identify below. Here's a clue for those of you who like puzzling this sort of thing out: it hinges upon what "empty" means.
Connect to a data source.
As it turns out, Parameters are dependent upon Data Connections for their existence. It's impossible to create a Parameter unless at least one Data Connection is open in the workbook.
So you'll need to connect to one.
I'm connecting here to my saved "Dummy Data" data source. It doesn't really matter what's in the data, how many or what types of fields it has, nor how much or little data it contains. The advantage "Dummy Data" has here is that it only contains one Dimension and one Measure, so that it takes up very little space in the Data Window, making it easier to see what's happening in the following steps.
Here's Dummy Data in the Data Window.
Create a Parameter.
Parameters are created via the Data Window's right-click menu available in either the Dimensions or Measures panel.
Accessing this menu can be a little tricky since each of the individual Dimensions and Measures has it's own right-click menu. Care must be taken to right-click in either the Dimensions or Measures panel in a space that's separate from the Dimensions and Measures.
Go ahead and create a Parameter. I let my new Parameter use the default configuration values.
Please note that I've adjusted these images from the actual Tableau UI, moving their elements into the width shown here. This has no effect on functionality, but makes it possible to show them in this blog's limited width.
Here's newly created Parameter 1
Tableau has created a Parameters panel for the Data Window and is showing Parameter 1 in it.
You can experiment with Parameter 1, although all you can really do is one of: left-click on it, in which case Tableau highlights it, colored green or blue depending upon its type; or right-click on it, which brings up the functional menu that gives you the opportunity to, among other things, choose the "Show Parameter Control" option.
Since we want to show the Parameter in the analysis space, you can go ahead and choose the "Show Parameter Control" from Parameter 1's right-click menu.
Or
You can choose "Parameter 1" from the Analysis menu's "Parameters" option, as shown here.
Of course, if you named your Parameter something other than "Parameter 1" that name will show up here.
Showing Parameter 1.
Now let's make it a phantom.
Close "Dummy Data".
Closing "Dummy Data" will remove it from the workbook.
From above, when there are no Data Connections in the workbook, Tableau doesn't provide any presentation for Parameters in the Data Window. Given this, what seems reasonable to you, in terms of Parameter 1?
Let's see what Tableau does – go ahead and close Dummy Data from its right-click menu.
Holy Cow!
We have a Phantom Parameter.
Interesting. But what, really, is a Phantom Parameter?
Simple, it's one that cannot be accessed to configure or manage it. We can't change anything about it—not its type, format, whether it accepts All values, a List or values, or values within a Range. We can't delete it.
We can toggle its visibility via the Analysis menu's "Parameters" option. I used it above because in this scenario it's the only way to show/hide the Parameter control.
If the Parameter's control is visible we can operate it, which is really pretty meaningless in this context, since there's nothing for it to affect. Is this a bad thing? I think it's moderately ungood. Not actively harmful, it's an oddity that introduces friction where there needn't be any.
As an interesting exercise, go ahead and try this:
- Hide Parameter 1
use either the "Analysis|Parameters" menu or select the "Hide Card" option from Parameter 1's context menu (via the down-triangle glyph visible when you mouse onto Parameter 1). - Once Parameter 1 is not visible, save and close the workbook.
- Now re-open the workbook — Parameter 1 isn't visible, nor is there a Parameters panel in the Data Window.
- Select the "Analysis|Parameters" menu option. There's Parameter 1, ready for presentation.
What's going on here?
The short version is that Parameters were implemented as a special of data source internal to the workbook. This makes sense from the perspective of the implementation being able to leverage Tableau's existing data management mechanisms, but it has consequences that are sometimes less than optimal for the Tableau user.
For example, the Parameters internal data source is named "Parameters", so Tableau won't let you name a Data Connection "Parameters"; if you try it Tableau shows you this message:
The message is misleading in at least two ways: the user has no visibility to the "Parameters" data source that Tableau claims already exists—Tableau never reveals "Parameters" in the user interface; and it's not always technically correct—Tableau reserves the "Parameters" Data Connection name even before it creates the internal Parameters data source (this is admittedly a very fine hair to split, but I think it's significant).
Is this dangerous?
Given this odd behavior, what does this mean? Does it signal anything about Tableau that's dangerous, or could cause problems for ordinary Tableau users?
Not to worry. This one little wrinkle doesn't, as far as I can tell, indicate that there's anything amiss that is cause for real concern.
It is, however, a manifestation of deeper, substantive aspects of how Parameters were implemented in Tableau that do have consequences that surface in different places. I'll be examining these in future posts.
A better design proposal.
The basic problem with Parameters that this situation reveals is that they've been implemented as a shadow data source that's only partially surfaced to the Tableau user interface. We've seen here one scenario in which there's the opportunity for real confusion, and confusion in a UI is invariably a bad thing.
It would make sense if parameters were first class Tableau citizens. The set of Parameters should occupy their own space separate and apart from the data sources. This would alleviate the situation of the name "Parameters" not being available for a user-named data connection.
As Parameters have an existence apart from other data sources— e.g. they persist in a workbook even if no data sources exits, they should be represented in the UI separate and apart from data sources. I think I see why their presentation within the Data Window might have seemed to make sense when Parameters were introduced, but it's one of those things that needs to be adjusted so that the UI accurately reflects Tableau's components' semantics. The counter-argument is that this would overload and complicate the user interface, that they're working OK as implemented, and that there's no real cry from the user community to change the way things are. This is a powerful argument, one that hard to contest. It's also the "things are good enough" argument that's led many once-successful endeavors down the path to obsolescence.
Clearly, improving how Parameters are handled in Tableau isn't likely to be trivial, and it may have wide ranging implications, up to and including reconsidering the set of uses they're put to and contemplating whether there isn't a better way to satisfy these needs. The specter of complexity is an inhibitor, but Tableau would be a better tool if at least the wrinkles identified here were ironed out.
In my experience this behavior causes massive headaches when using Tableau Server data sources. Parameters are stored with the data source when it is published. Creating a new workbook and connecting to the data source populates the workbook with the parameters. From here on out the parameters live not in data source but to the workbook. Modifying a parameter in the data source does not propagate to workbooks. Closing or swapping data sources leaves the parameters in the workbook and often orphans them. They no longer cause Custom SQL queries to refresh when a new value is selected and sometimes they are no longer available to be used in calculated fields.
ReplyDelete