Create a calculated field called Total Annual Income

○ This field represents the addition of the Annual Income variable and the Annual
Income Joint variable.
■ Note 1: Technically the Annual Income Joint field already contains the
Annual Income, but as an educational exercise, we are just pretending
that you need to add the two together to get the Total Annual Income.
■ Note 2: Also be careful and check your data types for these two fields.
Both fields should be a decimal data type.
○ If your Annual Income Joint variable is a numerical data type, you will notice
that it has null values. Important: review this Tableau article, especially the ZN
option, for working with null values or your calculation might not work as
expected.

To create a calculated field called Total Annual Income in Tableau, follow these steps:

1. Open your Tableau project and navigate to the worksheet where you want to create the calculated field.

2. Right-click on any blank space in the Dimensions/Measures pane on the left, and select "Create Calculated Field" from the context menu.

3. In the Calculation dialog box, enter a name for the calculated field such as "Total Annual Income".

4. Enter the calculation formula that adds the Annual Income variable and the Annual Income Joint variable. The formula should look like this: `[Annual Income] + [Annual Income Joint]`.

5. Check the data types of the Annual Income and Annual Income Joint fields to ensure they are both decimal data types. If not, you may need to convert them using Tableau's data conversion functions.

6. If the Annual Income Joint variable has null values, you can handle them using the ZN function. Modify your calculation formula as follows: `ZN([Annual Income])+ZN([Annual Income Joint])`. The ZN function replaces null values with zeros, allowing the addition to work properly.

7. Click the "OK" button to create the calculated field.

Now, you should see the Total Annual Income calculated field in your Dimensions/Measures pane. You can use this field in your visualizations and analysis as desired.

Why are we not using sum of annual income?

We are not using the SUM aggregation function with the Annual Income variable because it is assumed that the Annual Income and Annual Income Joint variables are already at a granular level and represent individual amounts of income. In other words, if you add them together, you are getting the total of the individual incomes, not the sum of the variable itself.

For example, if you have two rows of data with Annual Income values of $50,000 and $60,000, and the Annual Income Joint variable represents the combined income of a couple, the Total Annual Income would be $110,000 (not the sum of $50,000 and $60,000, which would be $110,000 as well).

Essentially, the Total Annual Income calculated field is combining the individual incomes represented by the Annual Income and Annual Income Joint variables to get the total combined income.

Create a calculated field called DTI

○ This field represents the debt-to-income ratio. You will calculate it by taking the
Total Debt variable and dividing it by Total Annual Income calculated in the
previous step. We want a percentage, so in the calculated field, multiply your
answer by 100 and round to 2 decimal places

To create a calculated field called DTI (Debt-To-Income Ratio) in Tableau, follow these steps:

1. Make sure you have already created the Total Annual Income calculated field as described in the previous response.

2. Open your Tableau project and navigate to the worksheet where you want to create the calculated field.

3. Right-click on any blank space in the Dimensions/Measures pane on the left, and select "Create Calculated Field" from the context menu.

4. In the Calculation dialog box, enter a name for the calculated field like "DTI".

5. Enter the calculation formula that calculates the debt-to-income ratio. The formula should be: `ROUND(([Total Debt] / [Total Annual Income]) * 100, 2)`. This formula divides the Total Debt variable by the Total Annual Income variable and then multiplies the result by 100 for the percentage representation. The ROUND function is used to round the result to two decimal places.

6. Click the "OK" button to create the calculated field.

Now, you should see the DTI calculated field in your Dimensions/Measures pane. You can use this field in your visualizations and analysis to represent the debt-to-income ratio for your data.

Build a distribution plot (histogram) for Total Annual Income

○ Change bin size to 25,000
○ The x-axis tick-mark interval should be 25,000
○ Change the title to Total Annual Income Distribution: <Student Name>

To build a distribution plot (histogram) for the Total Annual Income in Tableau with the specified settings, follow these steps:

1. Drag the Total Annual Income field to the Rows shelf.

2. On the Marks card, ensure that the Mark type is set to Bar.

3. Right-click on the Total Annual Income axis and select "Edit Axis" from the context menu.

4. In the Edit Axis dialog box, go to the "Ticks" tab.

5. Set the "Major" tick mark type to Fixed and enter 25000 in the "By" field. This will set the x-axis tick mark interval to 25,000.

6. Click the "OK" button to apply the changes.

7. Right-click on the Total Annual Income field on the Rows shelf and select "Add to Shelf" > "Bins".

8. In the Bins dialog box, set the bin size to 25,000.

9. Click the "OK" button to create the bins.

10. To change the title of the visualization, click on the default title above the plot area.

11. In the title text box, enter "Total Annual Income Distribution: <Student Name>". Replace "<Student Name>" with your actual name.

12. Press Enter or click outside the title text box to apply the changes.

Now, you should see a distribution plot (histogram) of the Total Annual Income with a bin size of 25,000 and x-axis tick marks at every 25,000 interval. The title of the visualization should display "Total Annual Income Distribution: <Student Name>". Adjust the visualization settings or formatting as desired.

why is the histogram a single bar

If the histogram for the Total Annual Income is displaying as a single bar, it is likely because all the values in your data fall within a single bin. A histogram is a graphical representation of the distribution of a continuous variable, where the variable values are divided into intervals or bins. Each bar in the histogram represents the count or frequency of the variable values falling within that specific bin.

To address this issue and ensure that the histogram displays the desired distribution, you can take the following steps:

1. Verify that the Total Annual Income field is of the correct data type. It should be a decimal or numeric data type to accurately represent income values.

2. Check the data range of the Total Annual Income field. If all the values are already within a single bin, you may need to adjust the bin size to better capture the distribution. Decrease the bin size to create more bins and capture the variability in income values.

3. Right-click on the Total Annual Income field on the Rows shelf and select "Edit" to modify the bin settings. Reduce the bin size, for example, to 10,000 or even smaller increments, depending on the range of your data.

4. Apply the bin size changes and observe the histogram. It should now display multiple bars, each representing the count or frequency of values falling within their respective bin.

By adjusting the bin size to better fit the range and variability of your income data, you should be able to create a histogram that accurately represents the distribution of Total Annual Income.

whats the x-axis label