2019: Week 38


This week's challenge comes from a Data School consultant - Collin Smith. He used Tableau Prep Builder as described below before he joined The Data School and has been enjoying the Preppin' Data challenges so wanted to contribute his own challenge. I hope you enjoy it and let him know how you get on!
_____________________________________

Last spring, I worked with Health in Harmony, a planetary health organization in Borneo, to help get them set up using Tableau Prep and Tableau Desktop. One of my big jobs was to re-create a medical data workflow that was originally in SPSS with Tableau Prep. The challenge this week comes from one of the steps of that workflow that involves heavy use of the aggregation tool and some clever join logic. I’m heavily indebted to the Tableau Service Corps and Community Forums for guiding me through this the first time.

Requirements
Use the join and aggregation tools to find metrics on each patient based on the dates they have visited the clinic.


  • Connect to the Input data set
  • Create a field that provides the date a patient first visited the clinic
  • Create a field that provides the number of times a patient has visited the clinic in total
  • Create a field that gives a patient’s visit number (i.e. how many times they have visited the clinic) for each visit.
  • Write a calculation that flags when a particular visit is a patient’s first visit.
Output
A single sheet that conserves all original information and rows but adds fields for the following:
  • Total visits by the patient
  • Patient visit number
  • Date of first visit
  • New Patient Flag
9 columns, 1000 rows (1,001 rows including headers)

Check out this workbook on Tableau Public for some ideas on what you can do with this output. Looks like this clinic might not be in business much longer!

The outputs can be found here for comparison. Don’t forget to fill the participation tracker and share your solutions using #PreppinData on Twitter.

Popular posts from this blog

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text