2 Replies Latest reply: Feb 3, 2014 7:36 AM by Ronan Lefevre RSS

    What's wrong in my Formula

      What's wrong in my formula ?

       

      Sum({$<CHARGE_PROJECT_NC_TYPE ={"BUSINESS DEVELOPMENT"}>} (Sum(Aggr(If(PERSON_ID = PLAYER_PERSON_ID,Sum(If(CHARGE_EXP_ITEM_DATE < PERIOD_MONTH_START OR CHARGE_EXP_ITEM_DATE > PERIOD_MONTH_END,0,CHARGE_ENTERED_HOURS * CHARGE_EMPLOYMENT * EMP_CHARGEABLE))),0),PERIOD_MONTHYEAR,PLAYER_PERSON_ID,PERSON_ID))

        • Re: What's wrong in my Formula
          Gysbert Wassenaar

          The parentheses don't match up and you're not using an aggr in the outer sum. So you have sum({...}sum(aggr(...)) where you need sum({...}aggr(sum(aggr(...),x,y,z)),p,q,r))

            • Re: What's wrong in my Formula

              Thanks, problem is  I"am getting 0 as result.

               

               

               

              My formula who's working for my total hours is where my selection is the Player Person_id :

               

               

              =Sum(Aggr(If(PERSON_ID = PLAYER_PERSON_ID,Sum(If(CHARGE_EXP_ITEM_DATE < PERIOD_MONTH_START OR CHARGE_EXP_ITEM_DATE > PERIOD_MONTH_END,0,CHARGE_ENTERED_HOURS * CHARGE_EMPLOYMENT * EMP_CHARGEABLE)),0),PERIOD_MONTHYEAR,PLAYER_PERSON_ID,PERSON_ID))

               

               

              and from this total I want only my Business development hours

              (this work's when I put in my slection the Person_id)

               

               

               

              //Sum({$<CHARGE_PROJECT_NC_TYPE ={"BUSINESS DEVELOPMENT"}>}If(CHARGE_EXP_ITEM_DATE < PERIOD_MONTH_START OR CHARGE_EXP_ITEM_DATE > PERIOD_MONTH_END,0,CHARGE_ENTERED_HOURS * CHARGE_EMPLOYMENT * EMP_CHARGEABLE))