Ever wonder how to become faster at Tableau but don’t have time to read every Tableau blog? Or maybe you wish there was an easier way to do some tableau stuffs without wasting your precious time? This article is a monthly list of 10 tips or tricks you can use in Tableau that takes less than 5 minutes to learn. These tips will help you save time, expand your knowledge, and will generally impress your friends/supervisor. Please do check first Tableau Tips and Tricks Part 1 before going through part 2
Tableau Trick 1:
Change the font size of the calculation box
This is a great tip when working with long or complex formulas or when demonstrating to an audience and your need to increase the font size so that everyone in the audience can see the text, especially those in the back.
For PC users, make the text in the calculation box bigger (or smaller) by holding the CTRL key+ using the scroll wheel on your mouse.
CTRL + Scroll UP to increase font size / CTRL + Scroll down to decrease it.
Tableau Trick 2:
Moving labels around with a simple click and drag:
This simple, but effective tip will allow you to put finishing touches on the visualization. You can simply move your Text labels with a simple Click and Drag.
Tableau Trick 3:
How to use Animation on Tableau Dashboard
As we all know we can embed the YouTube video in our Tableau viz but do you know we can also incorporate animated gif files inside the Tableau .Currently, Tableau won’t play animated gif files when placing them in a Dashboard as an Image tile, but if you place them as a Web Page tile they will work. You just need to load your animated gif to a hosting server like Google Drive or you can also use a Dropbox link from your Dropbox folder.(Double Click on image to see the animation)
Tableau Trick 4:
Generating .jpg/.PDF/.CSV through Tableau Public or Tableau Server URL.
For any Tableau visualization on Tableau Public or Tableau Server where permission is available, you can use the URL in a number of great ways. For example, you can append “.pdf”, “.csv” and “.png” to the the visualization URL and Tableau will return a PDF, CSV or PNG file. The PDF and PNG will be images of your visualization view and the CSV option will download a CSV file. For example, here is a URL to my Tableau Public visualization:
Below link points you to one of my Tableau Dashboard which is showing weekly defect Status.
Now, for getting the required File like .jpg/.PDF/.CSV, we need to add the file extension in the suffix of the Tableau Public or Tableau Server URL something like below.
https://public.tableau.com/profile/rajvivan#!/vizhome/WeeklyDefectStatus/Dashboard1.PDF (This Generates PDF File)
(Double Click on image to see the animation)
Tableau Trick 5:
How to quickly connect Tableau to Data Source
The first step to getting started with Tableau Desktop is to connect to the data you want to explore. There are several types of data you can connect to and several ways to connect to your data. There are two ways through which you can simply and quickly connect your Tableau to the data which is present in your local directory or in your network .For example: – Excel data Source.
Just drag a data file onto the Tableau icon and Tableau will open the file. Drop a Microsoft Excel file or text file on the icon and Tableau will bring up the standard data import window.
Simply Copy the data from the excel File and paste on the Tableau interface. Sometimes you need to do few adjustment in the Data pane if you are not getting correct dimension or measures.
Tableau Trick 6:
Regular Expression- A powerful function in tableau
Sometimes you may come across such scenario in tableau where split function is not sufficient enough to split the String values into separate fields. Split is no doubt a very powerful function in Tableau if we have string fields in our data that contain multiple units of information. We can easily split the values based on a separator or a repeated pattern of values present in the string field. We can also achieve the same thing if we can create a calculated field by combining “Contains” ,”TRIM”, ”Left” and “Right” function which totally depends on our requirement.
We can also use a very powerful tableau function – Regular expression – which returns the portion of the string that matches the regular expression pattern. This function is available for Text File, Hadoop Hive, Google BigQuery, PostgreSQL, Tableau Data Extract, Microsoft Excel, Salesforce, and Oracle data sources.
REGEXP_EXTRACT (string, pattern)
REGEXP_EXTRACT (‘abc 123’, ‘[a-z]+\s+(\d+)’) = ‘123’
Let create a dummy Calculated Field which contains alphanumeric text and our requirement is to separate both the numbers and text by the dash and space?
You can also check the Email validity by using the below Regex Calculation
The sole purpose of putting this function over here is to make you aware what Tableau is capable of. Through this function, you can perform analysis on twitter data (emotional intelligence) which will give you insights on tweets if you are looking for any particular pattern. Please refer the below link for RE.
Tableau Trick 7:
Creating a custom legend with shapes
Formatting is an important part of both your analysis and presentation. You can format almost everything you see on a worksheet including the fonts, shading, alignment, borders, and graph lines but sometimes tableau default behavior is a hurdle. As we all know, the default color legend in Tableau uses small squares. In many case, this can be proved as showstopper for your dashboard and even confusing if you are using other shapes in your chart. For example, if you are using a dot plot. The color legend will show squares, but every other shape in the visualization is a dot. In cases like this, Square shape doesn’t make any sense. So for getting the desired result, follow the below steps
Create a new worksheet with the dimension you want in the legend and use custom shapes to create your own legend. If you are using a Tableau 9.2 Version then you can use a very interesting feature “Match Mark Color” which is found on the Font drop down in the Label menu and you can also change the colors of the text to match the shapes. Then drop that sheet into your dashboard in place of the normal color legend and see the magic. For More Information, refer here
But what if you are still using lower version of Tableau say Tableau 8.3 or 9.0.
Follow the Same process as described above like Create a new worksheet with the dimension you want in the legend and use custom shapes and assigned a common shape say circle to the dimension. Do some formatting like change the “Row Divider” and “Column Divider” to “None” present in the Format border. Also format the tooltip in such way that it should only show dimension name as below.
Then drop that sheet into your dashboard (keep it Floating), adjust the width of the sheet and put this new sheet on top of Shape legends something like below.
Tableau Trick 8:
Dynamically Change Units for Values
We often faced such problems when our users want everything dynamic rather than Static. For example Tableau should automatically decide the units for its value. In other words, if the required value is in thousands, it should show Unit “K” in the suffix or if it is in millions it should show Unit “M” in the suffix. It seems simple but trust me it’s not because Tableau doesn’t seem to accept this ($#, ##0.00M; #, ##0.00K) into its custom number formatting field. So we need to achieve this by using a calculated Field.
Let’s create a calculated Field by using the below calculation.
if SUM([Sales])>=1000 and SUM([Sales])<=99999 then “$”+STR(ROUND(SUM([Sales]/1000),2)) +”K”
SUM([Sales])>=100000 then “$”+ STR(ROUND(SUM([Sales]/1000000),2)) +”M”
sum([Sales])< 1 then “$”+STR(SUM([Sales]))
Tableau Trick 9:
Using MIN/MAX (1) as a place holder
Sometimes we are using a single Number in the dashboard for representing some critical number/Threshold value so that whoever will see the dashboard can pay some attention to those numbers. We often use white background because of some formatting issues but what if we can add a background color and on top of that we will add our data number.
Create a calculated field that is just the number 1 or 0.
Now just add that “One” Calculated Field (which will act as place holders) in the columns shelf and Region in the row shelf. After that change the aggregation to either “Avg” or “Min” or “Max”. You can also use Min (Number of records) as well.
Using Avg(1) as a placeholder. Go to the marks section then change the marks from automatic to bar chart. Right click on Axis and set the range from 0 to 1. You can also define/set the border on the bar chart, change the background color based on any value you want. Put your value on labels and you are good to go.
Tableau Trick 10:
Swap one pill for another in multiple sheets with one click
Given the nature of discovery and analysis in Tableau, it is very common that users need to replace previously created visualizations with other dimensions to see how the data would you like. Instead of starting from scratch and building a visualization for then applying formatting changes, etc. a user can replace one pill for another in all the worksheets in a whole workbook with a click of a button. This is also very useful when adding new data sources, replacing measures, updating or replacing data columns as well.
Category dimension is being used in this visualization to break down sales by Year
Now create another sheet which should contain Category dimension in this visualization .Also you can further break down sales by Subcategory.
After further analysis you realize that your whole workbook has the Category dimension in your visualizations but now you would like to analyze things by Region. Instead of starting over or manually replacing the pill everywhere, you can make use of this trick.
Right Click on Category dimension and select “Replace Reference…”
Now, find the Dimension or Measure that you would like Tableau to replace Category for. In this case, we picked Region and click OK.
Now, all the visualizations that contain the “Category” dimension in a visualization have been replaced for Region. You can apply this on measures as well!
POINTS TO REMEMBER:
How to remove Chart junk in Pie Chart.
Sometimes there are few visual elements in charts and graphs that are not necessary to comprehend the information represented on the graph, or that distract the viewer from this information. We used a term called “Chart junk” for representing such type of noise. Many times Tableau Guru’s mentioned or advised us to avoid pie charts until and unless it’s necessary. There are so many reasons and among those one reason is “Chart junk” in Pie chart.
Go to the Analysis Menu and select Create Calculated Field. Name the calculated field as Null and enter Null, which will result in a new T/F dimension and will be used to eliminate wasted space.
Drag Product Sub-Category to Columns and Profit to Rows. From Show Me select the Pie Chart. Drag the True/False dimension i.e Null Calculated Field to Columns and Rows. Right-click on both and select Hide Field Labels, or uncheck Header.
But do we really want to use (abuse) color and Pie Charts for this story? Don’t you think we can represent the same story in much better way, what you say.?