How To Work On Sample 2

This recipe demonstrates how to calculate accummulative summation in composite datasource.

Steps taken:

  1. Define the Microsoft Excel file (m20080325.xls) into a tabular datasource (Sample_20080401.ds).
  2. Create a composite datasource (Sample_Year_CP.ds). Drag and drop the tabular datasource into it as the beginning of the flow.
  3. Use “Derivative”, “Cube”, “Join”, “Sort” and “Filter” elements properly in the composite datasource, as shown in Sample_Year_CP.ds.
  4. Enter the following script into the “Script” tab of the composite datasource:

var MonthName =
[“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Sep”,“Oct”,“Nov”,“Dec”];
var QuarterName = [“Q1”,“Q2”,“Q3”,“Q4”];
var 累計 = 0;

var RunningSum = new Array();

AccumulativeSummation-Sample2

To download the necessary files for this recipe, refer to the attached ZIP package.
Sample2.zip