3 Replies Latest reply on Oct 11, 2018 3:05 PM by Nick Parsons

    Expression is too complex

    Milan Patel

      Hi,

       

      I am getting an error while applying weighting formula in tableau. The error is: Expression is too complex.

      Yes, the formula which I am trying to apply is quite a big formula. Because I am trying to apply weight from the year 2015 to current date. The formula literally going above 100 rows. I do not have any idea how to apply certain weight when the date period in filter is prior to 2017 and after 2017.

       

      Below is my formula. When I break up the formula in two different calculated field (one is 2015 to 2016 and second is 2017 to 2018), it works but in a single calculated field it is not working and gives the error: Expression is too complex.

       

      (IF SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region1 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region1" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region1" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region1" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region1 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Apr 15 - Dec 16]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region1" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region1" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region1" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region1 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Apr 15 - Dec 16]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region1" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region1" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region1" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region1 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Apr 15 - Dec 16]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region1" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region1 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])<=2016 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Apr 15 - Dec 16]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 17 - Dec 17]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 17 - Dec 17]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 17 - Dec 17]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region2" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region2 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region3" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region3 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2017 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 17 - Dec 17]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 18 - May 18]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 18 - May 18]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 18 - May 18]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 18 - May 18]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 18 - May 18]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 18 - May 18]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 18 - May 18]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 18 - May 18]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 18 - May 18]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 18 - May 18]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 18 - May 18]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 18 - May 18]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 18 - May 18]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 18 - May 18]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 18 - May 18]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region6" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region6 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])<=5 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - Jan 18 - May 18]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region9" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region9" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region9" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region9 - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region8" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region8" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region8" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region8 - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name4" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - June 18 - Current]*[Carrier Weight - Name4]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region9" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region9" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region9" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region9 - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region8" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region8" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region8" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region8 - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="NAME1" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - June 18 - Current]*[Carrier Weight - NAME1]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region9" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region9" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region9" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region9 - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region8" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region8" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region8" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region8 - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name3" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - June 18 - Current]*[Carrier Weight - Name3]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region4" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region4 - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region5" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region5 - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region9" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region9" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region9" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region9 - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7 - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7west" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7west - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region8" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region8" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region8" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region8 - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)+

      (IF SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END)>0 THEN (SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END) / TOTAL(SUM(IF[Region]="Region7east" AND [Carrier Name]="Name2" AND YEAR([Reporting Month])=2018 AND MONTH([Reporting Month])>=6 THEN 1 ELSE 0 END))*[Regional Weight - Region7east - June 18 - Current]*[Carrier Weight - Name2]) ELSE 0 END)

        • 1. Re: Expression is too complex
          Jim Dehner

          Hi

          yes very complex - I would guess that your data is poorly structured and is a wide table (lots of columns of separate measures) vs a tall file with few columns and lots of rows

          can't tell by the post - but the first approach would be to pivot the data to get the structure right - followed by a combination of simple calculations and table calculations that leverage tableau's capabilities

           

          Pivot Data from Columns to Rows

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: Expression is too complex
            Milan Patel

            Hi Jim,

             

            You are right. My input file is an excel file having 200+ columns and 55000+ rows. I will try this pivot table thing you mentioned. I have to figure out how this solution can be implemented. will keep the details posted here.

            • 3. Re: Expression is too complex
              Nick Parsons

              It looks like you have a lot of unnecessary nested if...then conditions, and the pattern is repeated on every line. You possibly have unnecessary function calls, not sure without testing it in a workbook but i'd also look there.