I wanted to share a screenshot of the longest calculated field I have ever had to build for work

So I work for a large healthcare organization and we need to track things like trends in patient data, and see whether upward or downward trends are statistically significant. That is done through special chart types called SPC charts. The thing is, the same couple of control charts will be needed over and over again in healthcare since we need this in every department, so it made sense to build a template where Tableau developers in every department (nursing, pediatrics, etc) can all have a template to use instead of researching their charts and recycling all the work. They just take the code already in the template and copy it over into their own dashboards.

It was my responsibility to build the template that the other Tableau developers are supposed to use. Since control charts can involve multiple steps and they were going to be copy and pasted into other dashboards with the data source replaced, I had to use as few calculated fields as possible to avoid confusing whoever was going to copy and paste my calculated fields into their workbook. So that's how I got this very, very long calculated field - the end user just makes changes further upstream in an "insert numerator here" and "insert denominator here", select the kind of control chart they want, and then the upper and lower limits are automatically calculated. This calculated field may be very long, but what's cut off is instructions at the top to not modify it and just drop it into a viz.

/r/tableau Thread Parent Link - i.redd.it