Command Reference : Function Reference : Function Reference: P
  
 
@periodtodate
Within-period cumulative sum (period-to-date).
Syntax: @periodtodate(x, y[, s])
x: series
y: series
s: (optional) sample string or object
Return: series
Cumulative sum of series x within each period, where each period is defined by a contiguous block of identical values in series y, subject to limitations imposed by the optional sample or workfile sample.
This function is panel aware.
Examples
If x is a series of monthly profits, then
show @periodtodate(x, @quarter)
returns a linked series of quarter-to-date monthly profits.
Cross-references
See also @ytd.