HomeLinuxCalculated Subject in Tableau

Calculated Subject in Tableau


In Tableau, a calculated subject is a robust function that permits the customers to create new fields or columns primarily based on current information and apply customized calculations to govern or analyze the information in several methods.

Calculated fields are created utilizing formulation and expressions that use operators, capabilities, and references to different fields or information parts. These formulation can carry out varied calculations reminiscent of mathematical operations, string manipulations, logical comparisons, and aggregations.

Calculated fields can be utilized to generate new measures or dimensions, apply conditional logic, carry out information transformations, and create advanced calculations. They supply flexibility and allow the customers to derive significant insights from their information by performing customized calculations that aren’t instantly obtainable within the authentic dataset.

Step-by-Step Information on How one can Create a Calculated Subject in Tableau

The next steps will enable you to create a calculated subject in Tableau:

Step 1: Connect with Your Information Supply

Launch the Tableau Desktop and click on on “Connect with Information” or choose the “File” > “Connect with Information” to connect with your required information supply. Select the suitable connection methodology primarily based in your information supply kind (e.g., Excel, CSV, database). Allow us to use the obtainable World Indicators information whenever you set up Tableau.

Step 2: Select a Worksheet

After connecting to your information supply, Tableau opens a brand new worksheet by default. For those who’re already on a unique worksheet, click on the “Sheet” tab on the backside of the display to change to the specified worksheet.

Allow us to use the Well being Indicators sheet for this illustration. Different worksheets reminiscent of Care Spend, Financial system, Know-how, Enterprise, Tourism, and International Indicators are on the backside. You possibly can select to make use of any of them.

Step 3: Entry the Calculated Subject Dialog Field

Within the Information pane on the left facet of the display, right-click the arrow to open a context menu. Select “Create Calculated Subject” from the context menu. A calculation workspace will seem.

Step 4: Present a Title for the Calculated Subject

The calculated subject dialog field will seem. Enter a descriptive identify on your calculated subject within the “Title” subject on the prime. For instance, we create a calculated subject that finds the distinction in life expectancy between men and women. So, we identify the calculated subject as proven within the following:

Step 5: Write the Method for Your Calculated Subject

Within the “Method” subject throughout the “calculated subject” dialog field, you possibly can kind your method instantly or use the obtainable capabilities and operators. You need to use the sector names, operators (reminiscent of +, -, *, /), capabilities (reminiscent of SUM(), IF(), LEFT()), and constants (reminiscent of numbers or textual content) to create your method.

Tableau supplies autocomplete options and syntax highlighting to help you as you kind. Our method for this calculation is:

[Life Expectancy Female] – [Life Expectancy Male]

It’s entered as proven within the following:

Step 6: Evaluate and Finalize the Method

After writing your method, overview it for accuracy and make sure that it meets your calculation necessities. If wanted, make changes to the method till it produces the specified end result. Tableau will provide you with a warning in case your method has any points.

Click on the “OK” button within the “calculated subject” dialog field to save lots of the calculated subject.

Step 7: Make the most of the Calculated Subject in Your Visualization

The newly created calculated subject will now seem within the “Dimensions” or “Measures” pane with the identify that you just supplied.

Drag and drop the calculated subject onto your worksheet to make use of it in visualizations, filters, sorting, and grouping.

That’s it! You efficiently created a calculated subject in Tableau. Repeat these steps as essential to create the extra calculated fields. Keep in mind that you may at all times edit or modify the calculated subject by right-clicking on its identify within the “Dimensions” or “Measures” pane and deciding on “Edit Calculated Subject” from the context menu.

Conclusion

As soon as created, the calculated fields can be utilized like every other fields in Tableau reminiscent of in visualizations, filters, sorting, and grouping. They’ll tremendously improve the analytical capabilities of Tableau and allow the customers to carry out the superior information evaluation and create insightful visualizations.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments