1 of 1 people found this helpful
I would think about a data structure that allows you to standardize the “day.” Days before or after surgery (e.g. -5, 0, 2, 10 would be 5 days before, day of, two days after, 10 days after). You can do this in Tableau (see https://vizpainter.com/perspective-how-a-small-dataviz-tweak-can-tell-a-radically-different-data-story/ or a DATEDIFF between the medication date and the surgery date). If you can structure the data prior to Tableau, you’ll likely find the analysis in Tableau easier. I would probably want to ultimately end up with one record per patient, per date, per medication (and potentially per surgery if there was the possibility of one patient having multiple surgeries – though the number and dates of surgeries should also be indicated at the record level).
It’s definitely an interesting question!
This thought did enter my mind. But hearing from you solidifies my thought. I will work through it and update the thread when done.
Thanks Again. And thank you for the link and all your blogs. They are really amazing.