1 Reply Latest reply: Sep 1, 2017 11:18 PM by Cecília Fujita Abrahão RSS

    How to use one variable in second variable definition?

    Joanna Skoczylas

      Hi,

      I try to use variables in definition second variable with using if statement.

      All two variable (vMeeting_PGE and vTime_PGE) got good numbers in result.

      example:

      vMeeting_PGE=count({$<status={"SPZP"},campaign_id={"PGE"} >}status

       

      vTime_PGE=((sum({$<campaign_id={"PGE"}>}Interval(wait_sec/86400,'hh:mm:ss'))+sum({$<campaign_id={"PGE"}>}Interval(dispo_sec/86400,'hh:mm:ss'))+sum({$<campaign_id={"PGE"}>}Interval(talk_sec/86400,'hh:mm:ss')) + sum({$<campaign_id={"PGE"}>}Interval(pause_sec/86400,'hh:mm:ss')))+([godziny dodawane w PGE])-([godziny odejmowane w PGE])-(sum({$<campaign_id={"PGE"},sub_status={"SZKOL","COACH"} >}(Interval(pause_sec/86400,'hh:mm:ss'))))-(sum({$<campaign_id={"PGE"}>}Interval(wait_sec/86400,'hh:mm:ss'))))*24

       

      and I try to use it in definition other variable wit using IF statement:

       

      vCoefficient_PGE   definition: if(vMeeting_PGE/vTime_PGE+0.5>=1.5,1.5,vMeeting_PGE/vTime_PGE+0.5) this got nothing


      vCoefficientvTime_PGE definition: if($(vMeeting_PGE/vTime_PGE)+0.5>=1.5,1.5,$(vMeeting_PGE/vTime_PGE)+0.5) this got nothing


      vCoefficientvTime_PGE definition: if($(vMeeting_PGE)/$(vTime_PGE)+0.5>=1.5,1.5,$(vMeeting_PGE)/$(vTime_PGE)+0.5) this got wrong numbers in result


      When I use in expression  definition: $(vCoefficient_PGE)  it doesn't work.

       

      How I can solve this problem?