This calculates the average value for a series for each full calendar week within the display period. Incomplete weeks at the beginning or end of the display period are ignored. A calendar week runs from Monday to Friday.
CWA#(Expression,Carry Indicator,Display Indicator)
Where the optional Carry Indicator can be:
D Default; carry previous value, but not between periods
C Carry previous value
I Ignore
N N/A is displayed when there is a null value in the series.
Display Indicator - the default is to display values only for complete periods, however the following optional parameters exist -
P Values calculated for incomplete calendar periods at the start of the display period.
R Values calculated for incomplete calendar periods at the start and end of the display period.
See Average format for details.
CWA#(D:BMW,D)
This calculates the average price for BMW for each full calendar week within the display period. Null values within a week are overwritten with the previous day's value and values are not carried over from previous weeks.
CWA#(VOD,C,R)
This calculates the average price for Vodafone for each full calendar week within the display period. Null values within a week are overwritten with the previous day's value, and values are calculated for the incomplete calendar periods at the start and end of the display period.
The N parameter is not currently supported by AFO in the Functions selector, AFO Intellisense or the web Expression Builder in DFO / Datastream Charting, however it is supported by the AFO Expression Builder, DFO Intellisense and Functions selector. The Display Indicator is not currently supported by any of the Functions selectors, Intellisense or Expressions Builders. The function will only be accepted in the AFO Expression Builder if the Carry Indicator is included. The parameters are fully supported when used directly in AFO or DFO requests, and a line will be plotted successfully in Datastream Charting.