I feel an urgent need to blog about a simple feature in Tableau that just potentially saved me from hours of retrospective code-amending and checking.
My almost nightmare
Let me start with some context. I’ve spent the last few days exploring a dataset in Tableau and am now well advanced in the analytical stage of the work having created a large number of calculated fields in the process.
That’s when disaster struck. I realised that my sales value field – which forms the basis of my many calculated fields – was actually displaying local currency values meaning I was comparing dollars and pounds. Naturally, this can quickly be fixed by creating a new field that multiplies the value by an exchange rate brought in through a lookup table to adjust the values to a consistent measure. However, this new column still needs to be reflected in all the places that the previous field was being used. I would first have to identify all of the places where the original field was referenced before making the alterations. I’ve previously spent hours in Excel models modifying references when changes have been made further upstream.
My first thought at this point was that Tableau must have some in-built feature that could help me out – maybe something similar to Excel’s ‘trace precedents/dependents’ feature. I wasn’t wrong. I began to search for some kind of index that would list all of the places where I had referenced the first field. I found something even better.
Right click on any dimension, measure or parameter in the Data pane and you will see the ‘Replace References’ option. This will allow you to select a field that will replace any reference to the chosen column across your work. It’s that simple.
Nice one, Tableau
You may well have already known about this feature. Great. But what’s particularly satisfying about this situation from a user experience perspective isn’t that the feature exists. It’s the fact that I was able to find it in under 2 minutes with nothing more than a hunch that something like it might exist.
So a big thank you from me to the software developers behind that feature, as well as to the UX people that made it possible for me to get the most out of the software.