July 16, 2012

Feature Code 8: Cross-row Computing In Loop

  • Relative Locating refers to locating to a position that is a certain number of cells/groups before or after the current records/groups. This kind of data computation is usually the typical SQL puzzles. However, esProc solves it easily.
  • For example, to compute the month-on-month increase of sales volume of each month compared with that of previous month, you can simply use sales.(amount-amount[-1]) to represent it. Of which the relative number is represented as [n].
  • Just another example, to find 3 months with the highest sales volume and their respective month-on-month increases.
  • The Comparing with Last Period, Moving Average, and Add Up are the typical applications of relative locating. Please find the below example:




Annotation 1 


Annotation 2