15 Replies Latest reply: Apr 1, 2016 1:54 PM by Jing Yang RSS

    Sum with condition for less than specific dimension value

    Jing Yang

      Hi experts,

       

      I believe this should be easy, but I cannot get it correct

       

      My data like below:

       

      ScoreNumOfStudents
      2608
      2625
      2671
      2734
      2778
      2782

       

      I would like to sum the NumOfStudents for the score less than the specific score. ex. for score 273, it should sum up NumOfStudents for score 267, 262, 260 which is 8+ 5 +1 = 14. Score is the dimension.

       

      I have tried:

      sum([$<Score= {">=$(=Min(Score)) < $(=(Score))"}>} NumOfStudents)  and

      sum({$<Score= {">=$(=Min(Score))"}>} NumOfStudents)

      but none of them are working.

       

      How should I achieve this? The solution either in expression or data load script will be fine with me .

       

      Thanks,

      Jing