Data Labels in Tableau reports or any other Business Intelligence reports plays a vital role to understand the report data. For example, By seeing the bar chart or Pie chart we can easily understand, which country sales is greater than the other but we can’t see how much sales (in number) each country has done. In these situations we can enable Data Labels on the country region.
In this article we will show you, How add data labels in tableau reports with example?. For this we are going to use the SQL Server Data Source so, Please visit Connecting Tableau to SQL Server article to understand the connection process.
Custom SQL Query we used in the above data source is:
FROM DimProductSubcategory AS ProdSubCat
DimProduct AS Prod ON ProdSubCat.ProductSubcategoryKey = Prod.ProductSubcategoryKey
DimProductCategory AS ProdCat ON ProdSubCat.ProductCategoryKey = ProdCat.ProductCategoryKey
FactInternetSales AS Fact ON Prod.ProductKey = Fact.ProductKey
DimCustomer AS Cust ON Fact.CustomerKey = Cust.CustomerKey
DimGeography AS Geo ON Cust.GeographyKey = Geo.GeographyKey
NOTE: Don’t worry about the code and Joins we used in the above statement perhaps you should concentrate on Data Labels. However, If you are interested in learning SQL Server, Please visit our SQL tutorials page.
TIP: This is the query, we are going to use for rest of the Tableau tutorials
Below screenshot will show, the Measures and Dimensions of the Data source
Before we start enabling the Data labels We are going to show you, How to Swap rows and columns or else flip the chart. To do this, Just click on the button we marked below.
Once you click on that button, you can notice that the chart is swapped or flipped as shown below
Method 1 to add Data Labels in Tableau Reports
First method, Click on the Abc button in the Tableau toolbar. From the below screenshot you can observe that, when you hover on the Abc button it will show the tool tip Show Mark Labels
Once you click on the Abc button, Data Labels will be shown in Tableau Reports as shown below
Method 2 to add Data Labels in Tableau Reports
Second method, Click on the Abc Label button present in the Marks Card. From the below screenshot you can observe that, when you Click on the Abc Label button a drop down window will be displayed.
From the drop down window, Please check mark the Show Mark Labels option to enable data labels in tableau reports.
By using this drop down window, We can also format the text, color, alignments to the data labels in tableau reports. From the below screenshot you can observe that, we changed the color
Thank You for Visiting Our Blog