7 Replies Latest reply: Sep 28, 2012 11:04 AM by bobbyraj santhiogu RSS

    set analysis and variable

      Hello everyone,

      Well I get an issue, and I've been woking on it since yesterday, and it's starting to give me a headache....

       

      Here's the thing :

      I've got a table with 2 columns :

      LOAD * INLINE [

      ID, SALARY

      1,1234

      2,4567

      3,5467

      4,904

      5,3456

      6,2123

      ];

       

      I created a variables which is $(median) = (max(SALARY)-min(SALARY))/2

       

      Now I want to count how many id's which have a salary over and below this variable

      I tried :

      • count({<SALARY={">$(median)"} >}distinct  ID) -> It's not working.
      • count({<SALARY={' >$(median)'} >}distinct  ID) -> It's not working either. (simple quote)

       

      I've tried many more things I saw in the forum, but no conclusive results.

       

      I really need eveyone's help,

       

      Wish you all the best,

      Will