10 Replies Latest reply on Jun 30, 2016 7:52 AM by Mark Williams Hutchins

    Totalling a table calculation

    Mark Williams Hutchins

      Hi All, some help please. I'm still quite new to tableau and I'm struggling with a calculation. I have created the below which is working fine:

      IF [order / avg]>=1 AND AVG([sales % of forecast])>=0.15 THEN 1 ELSE 0 END


      Order / avg is SUM([EA])/WINDOW_AVG(SUM([EA]), -12, -1)


      Sales % of forecast is [EA]/[Forecast EA]


      This is displaying a 1 where order avg is equal too or greater than 100% and sales % forecast is equal to or greater than 15% but I want the 1's to total up:


      Here you can see on the 24th August this happened 5 times so I want the total to show 5 but it just shows 1. Does anyone know how to fix this? Many thanks.