1 Reply Latest reply on Jan 14, 2019 6:19 PM by swaroop.gantela

    Western Electric Rules Control Report Create Alerts

    Joe Smart

      Hi Everyone!

       

      I am still fairly new to Tableau, so I'm hoping there is an easy solution to my problem (and therefore I can laugh at it!)

       

      Attached is an example workbook.

       

      I have created a control report in the style of the Western Electric Rules and am having trouble working out the best way to create automatic alerts so that I don't have to keep referring to the charts.

       

      Below is an example of the charts I have created, which shows the number of applications coming through each day:

       

       

      • The time frame is 14 days
      • The zones are divided by 1, 2 and 3 standard deviations

       

      If we take Rule 1 as an example (1 data point lies outside of the 3 standard deviation zones), I believe the best way of approaching this is as follows:

       

      • Calculated Field: IF [Applications] >= [UPPER 3 Standard Deviations] OR [Applications] <= [LOWER 3 Standard Deviations] THEN 1 ELSE 0 END   - > We call this 'Rule 1'
      • Alert: Send email if Rule 1 is: Equal to 1

       

      The issue I'm having with this is that this code will calculate for the whole time period of the data set, whereas I want it it to calculate for the last 14 days.

       

      Now, I used the following code to calculate the standard deviation lines:

       

      WINDOW_AVG(SUM([Applications])) - WINDOW_STDEV(SUM([Applications]))

       

      This obviously changes as I change the date filter.

       

      I am thinking my code should involve the WINDOW function?

       

      I think I'm nearly there, just missing something to make everything click in my head!

       

      All suggestions welcome, thanks in advance for all your help!

       

      Best,

       

      Joe