9 Replies Latest reply: Jan 24, 2014 9:44 AM by Jeremiah Kurpat RSS

    Using a variable to store a mathematical funciton = > < etc.

      Hi,

       

      I have the following graph:

       

      tempgraphtemp.png

       

      By using the following expression:

       

      MAX({<PatientID = PatientID+{'RefA', 'RefB'}>}

      IF(PatientID='RefB' AND PositionProcess.Position='Middle', (TimeBetweenEvents)*-1,

      IF(ProcessKey<>'0-1',

      IF(PositionProcess.Position='Middle' and $(GraphDimension)= $(GraphGroupOne),(TimeBetweenEvents),

      If(PositionProcess.Position='Middle' and $(GraphDimension)=$(GraphGroupTwo),(TimeBetweenEvents)*-1,

      IF(PositionProcess.Position='Middle',(TimeBetweenEvents),

      IF($(GraphDimension)=$(GraphGroupOne),0.0001,-0.0001)))))))

       

      I have currently got $(GraphDimension) set to Gender and $(GraphGroupOne) set to 'Male' and $(GraphGroupTwo) set to 'Female'. This allows me to display the value above and below the axis based on gender. All is good so far....

       

      The reason for the variables is so that the user can change the values within an input box and see different splits. The issue is in most some dimensions like 'Age' I don't just want equals to. I want to say IF....$(GraphDimension) > $(GraphGroupOne)....

       

      So I then created two new variables $(TopSign) and $(BottomSign). If I then use an input box and put equals for both variables and replace the '=' in the script (highlighted in red) I get an error and the graph doesn't display. Similarly if I create a text box and just set the expression to the variable I get a '-' e.g. no valid data. However if I point the value to the other variables it works. If I look in the variable menu it has got the '=' stored.

       

      Does anyone know how I might be able to resolve this issue?

       

      Thanks


      Dan