2 Replies Latest reply on Sep 1, 2018 2:36 AM by Okechukwu Ossai

    Calc Help

    Barb Reiser

      Sheet 4 of the attached workbook:

       

      I have one formula, Sales Agent Target, which contains 150392.42. I need to write a new formula that will show the target for each month. So I made the formula Sales Agent Target (copy):

       

      IF MONTH([Check In Time]) = 8 and YEAR([Check In Time]) = 2018 THEN "150392.42"

      ELSEIF MONTH([Check In Time]) = 7 and YEAR([Check In Time]) = 2018 THEN "169754.40"

      END

       

      But when I try to replace the original formula with this new one within the Team Target formula below, I get an error, "Can't multiple string and integer values". Not sure how to fix it. Is there another way to write the above formula so it will work in this Team Target one?

       

      IF ATTR([sup list (test book)].[Supervisor LOB]) = "Sales Sup" THEN ATTR([Sales Agent Target])*COUNTD([Name])

      ELSEIF ATTR([sup list (test book)].[Supervisor LOB]) = "Care Sup" THEN ATTR([Care Agent Target])*COUNTD([Name])

      END

        • 1. Re: Calc Help
          suman kumar

          Hi

           

          Can you please this.

           

          IF ATTR([sup list (test book)].[Supervisor LOB]) = "Sales Sup" THEN SUM([Sales Agent Target])*COUNTD([Name])

           

           

          ELSEIF ATTR([sup list (test book)].[Supervisor LOB]) = "Care Sup" THEN SUM([Care Agent Target])*COUNTD([Name])

           

           

          END

           

           

           

          Best

          Suman

          • 2. Re: Calc Help
            Okechukwu Ossai

            Hi Barb,

             

            Sales Agent Target (copy) is a string and cannot be used to multiply a number. Removing the quotation marks around the numbers will fix it.

             

            IF MONTH([Check In Time]) = 8 and YEAR([Check In Time]) = 2018 THEN 150392.42

            ELSEIF MONTH([Check In Time]) = 7 and YEAR([Check In Time]) = 2018 THEN 169754.40

            END

             

            See attached workbook.

             

            Hope this helps.

            Ossai