WorkOut Wednesday Week 4
Challenge: Common Base Line Charts and NFL QB’s
Dataset: Download the data from Here
Visualization to replicate:

#WoW-Week4

Points to Consider:

  1. You will have to use a Union in Tableau to get the data into 1 table
  2. I pivoted the data to get it into an easier to use format
  3. I filtered the quarterbacks to those that have played at least 3 seasons and those that have passed for at least 2000 yards in total
  4. You should be able to pick the QB that you want to highlight – this should be only the list of QBs after the filter
  5. The highlighted QB should be shown in the light blue color and should have a circle at the end of the line displaying their total passing yards
  6. Make the formatting of the chart the same as mine

Step 1: Connect to Data : Download file from he provided Link
Open Tableau Desktop –> Microsoft Excel –> Select the file downloaded
You will get a view like below

Step 2: Union the data as per the 1st Point mentioned in Points to consider
Select the all the sheets and Drag to data Source Area Like below –> Click Apply

Step 3: Rename the Sheet –> Year

 

Step 4: Lets filter the QB’s who played at least three Seasons and QB’s more than 2000
Select the Player Filter in data Source 

Step 5: Once you selected the player fields apply the filter like below

Now our data is ready and we can start creating visualization before doing this let us create necessary calculated fields
1) Seasons Played:

Formula: RUNNING_SUM(COUNTD([Year]))

2) Cumulative Passing Yds

Formula: RUNNING_SUM(SUM([Yds]))

3) Create a Player Parameter
Step 1: Select the Player Field –> Create –> Parameter

Step 2: Name the Parameter as “Pick a QB?” –> Click OK

4) Create a calculated to highlight the selected QB
Highlight Selected QB:

Formula: [Player]=[Pick a QB?]

5) Create a calculated field to fetch the maximum passing Yds per player
Maximum Passing Yds Per Player:

Formula: 

if LAST()=0 AND ATTR([Highlight Selected QB]) then [Cumulative Passing Yds]
ELSE NULL END

Lets start creating Visualization
1) Drag Seasons Played –> Columns, Cumulative Passing Yds –> Rows

2) Drag Player & Year to Detail, Highlight QB to Color( In same order as shown in Image in below)

3) Click on the Seasons Played ( In Rows ) –> Edit Table calculation –> Specific Dimension –> Arrange the Layout as per below image
Step 1:
Click on the Seasons Played ( In Rows ) –> Edit Table calculation 

Step 2: 
Specific Dimension –> Arrange the Layout as per below image

4) Repeat the 3rd point for Cumulative Passing Yds, Once you edited the Table calculation You will get a view a like below ( Change the mark section to Line)

5) Arrange the Highlight Selected QB Legend like below and Give the Colors as per Requirement

True : #17becf and
False :#d3d3d3

 6) Drag the Maximum Passing Yds Per Player to rows and Select Dual Axis

7) You will get a view like below after selecting the Dual axis –> remove the Measure Names from All Marks Section

 

8) Click on Maximum Passing Yds Per Player –> Edit Table Calculation –> Specific Dimensions –> Select the Fields like below

9) Click on Second Y-axis –> Synchronize Axis –> Again Click on Second Y-Axis –> Uncheck Show Header.

10) Change the Maximum Passing Yds Per Player Marks Section to Circle and Increase the size Accordingly

11) Drag the Maximum Passing Yds Per Player to Text

12) Drag Yds to All Marks –> Tool Tip Section

13) Arrange your tooltip Like below (All Marks Section)

14) Double Click on Title and Arrange the Text Like below

Final View is ready

Now add it to your Dashboard and do Some Little formatting needed and publish to Server

After Adding to Dashboard

Interactive Viz Link : https://public.tableau.com/views/COMMONBASELINECHARTSANDNFLQBSWWwk4/COMMONBASELINECHARTSANDNFLQBS?:embed=y&:display_count=yes&publish=yes 

Hope this helps. If you find this approach easy and if this blog helps to create a Visualization Kindly Tag Me to see your work Along with tag 
@EmmaWhyte and @VizWizBI they would love to see you participation in Workout Wednesday.