General Purpose Functions

The Analytic functions described in this section can provide a great deal of flexibility and utility for many kinds of applications.

Aggregate Column

Provides the cumulative sum of the numbers in a column of data from top to bottom returned in a column of equal length. The line-by-line aggregate may also be displayed as a percentage of the total sum of all the numbers.

Parameter Set

Parameters Description
Column Column on which to perform the aggregate operation. Column numbers begin with zero
Option Display result as cumulative SUM or PERCENTAGE
Include Original Data If “Yes” include the original dataset in the result table

 

Applications

Can provide running totals or percentages of periodic data sets like income over time, expenses over time, etc. Many other uses.

Data Sample

Input Parameter Result

Month

Revenue

Jan-10

20000

Feb-10

15000

Mar-10

18000

Apr-10

21000

May-10

16000

Jun-10

20000

Jul-10

22000

Aug-10

25000

Sep-10

24000

Oct-10

27000

Nov-10

28000

Dec-10

31000

Column = 1Option = SUM

Include Original Data = Yes

May-10

Month

Revenue

Result

Jan-10

20000

20000.0

Feb-10

15000

35000.0

Mar-10

18000

53000.0

Apr-10

21000

74000.0

16000

90000.0

Jun-10

20000

110000.0

Jul-10

22000

132000.0

Aug-10

25000

157000.0

Sep-10

24000

181000.0

Oct-10

27000

208000.0

Nov-10

28000

236000.0

Dec-10

31000

267000.0

 
Chart Sample
 
chart
 

Grade Column

This is a very useful function that calculates the relative importance or weight of each number in a data set with respect to the other members of the data set. It is calculated by percentage of the total sum, by probability (normalized so that total sum = 1), by percentile (normalized so that the maximum value = 100) or by rank.

Parameter Set

Parameters Description
Column number Column on which to perform the grade column operation. Column numbers begin with zero
Option PERCENTAGE, PROBABILITY, PERCENTILE or RANK
Include Original Data If “Yes” include the original dataset in the result table

 
Applications

Compare individual’s performance against their peers (Jolene S. is responsible for 50% of the 5-person department’s output), compare assets in a financial portfolio, product market share, etc. Many other uses.

Data Sample

Input Parameter Result

Name

Production

Ben

15

Sherry

33

Tom

34

Nancy

17

Jim

22

Carson

24

Jill

35

Mark

25

Mike

19

Jack

9

Harold

14

Bob

38

Willa

27

Column = 1Option = PERCENTAGE

Include Original Data = Yes

Name

Production

Result

Bob

38

12.179487179487179

Jill

35

11.217948717948719

Tom

34

10.897435897435898

Sherry

33

10.576923076923077

Willa

27

8.653846153846153

Mark

25

8.012820512820513

Carson

24

7.6923076923076925

Jim

22

7.051282051282051

Mike

19

6.089743589743589

Nancy

17

5.448717948717949

Ben

15

4.807692307692308

Harold

14

4.487179487179487

Jack

9

2.8846153846153846

 
Chart Sample
 
chart
 

Delete Column

Utility function used to delete selected columns from the current data set.

Parameter Set

Parameters Description
Column To Delete FIRST, LAST, OTHER
Column Index Comma separated list of column indices if Column To Delete choice is OTHER

 
Applications

This can be used to clean up the data set for data presentation in a table, or when a variable number of columns are being used to populate a chart. It is similar to the DataFilter process module supplied with NetCharts Reporting Suite, but provides the additional ability to delete the LAST column.

Data Sample

Input Parameter Result

X

Y

A

B

-0.5

0.5

-0.5

0.0

0.5

0.5

-0.5

1.0

0.5

-0.5

-0.5

2.0

-0.5

-0.5

-0.5

3.0

-0.5

0.5

-0.5

4.0

Column To Delete = OTHERColumn Index = 2

X

Y

B

-0.5

0.5

0.0

0.5

0.5

1.0

0.5

-0.5

2.0

-0.5

-0.5

3.0

-0.5

0.5

4.0

 

Delete Rows

Utility function used to delete selected rows from the current data set.

Parameter Set

Parameters Description
Row To Delete FIRST, LAST, OTHER
Row Index Comma separated list of column indices if Row To Delete choice is OTHER

 
Applications

This can be used to clean up the data set for data presentation in a table, or when a variable number of rows are being used to populate a chart. It is similar to the DataFilter process module supplied with NetCharts Reporting Suite, but provides the additional ability to delete the LAST row.

Data Sample

Input Parameter Result

X

Y

A

B

-0.5

0.5

-0.5

0.0

0.5

0.5

-0.5

1.0

0.5

-0.5

-0.5

2.0

-0.5

-0.5

-0.5

3.0

-0.5

0.5

-0.5

4.0

Column To Delete = LASTRow Index =

 

X

Y

A

B

-0.5

0.5

-0.5

0.0

0.5

0.5

-0.5

1.0

0.5

-0.5

-0.5

2.0

-0.5

-0.5

-0.5

3.0

 

Include Headers

Add new header row or replace existing data column headers with user-specified comma-separated list.

Parameter Set

Parameters Description
Column Action MODIFY or ADD
Row Index Column names, seperated by a comma

 
Applications

Charts are often configured to use the top row of a data set as the legend items; this function allows the developer to supply user-friendly names

Data Sample

Input Parameter Result

uid

lname

fname

qtre

399

Smith

John

32400

340

Javist

Rory

23923

234

Canbill

Sarah

39203

243

Valoa

Michelle

24555

Column Action = MODIFY
Column Names = User Id,Last Name,First Name, Quarterly Earnings 

User Id

Last Name

First Name

Quarterly Earnings

399

Smith

John

32400

340

Javist

Rory

23923

234

Canbill

Sarah

39203

243

Valoa

Michelle

24555

 

Count Group Names

Group a column of strings or names by content and count the number of occurrences of each string. The result is returned in two columns listing each distinct string and the corresponding number of occurrences side by side. The columns are sorted using an ascending or descending count.

Parameter Set

Parameters Description
Column Column on which to perform the group operation. Column numbers begin with zero
Option Sort data by ascending (ASC) or descending (DESC) count
Include Original Data If “Yes” include the original dataset in the result table

 
Applications

Can be used to count the number of transactions on a given day, the number of event occurrences in a given time period, the number of support calls from a given customer, etc. Many other uses.

Data Sample

Input Parameter Result

date

status

10/1/2010

Clear

10/2/2010

Cloudy

10/3/2010

Clear

10/4/2010

Clear

10/5/2010

Clear

10/6/2010

Partly Cloudy

10/7/2010

Cloudy

10/8/2010

Partly Cloudy

10/9/2010

Rain

10/10/2010

Rain

10/11/2010

Cloudy

10/12/2010

Rain

10/13/2010

Clear

10/14/2010

Partly Cloudy

10/15/2010

Partly Cloudy

10/16/2010

Rain

10/17/2010

Snow

10/18/2010

Snow

10/19/2010

Clear

10/20/2010

Clear

10/21/2010

Rain

10/22/2010

Partly Cloudy

10/23/2010

Clear

10/24/2010

Cloudy

10/25/2010

Rain

10/26/2010

Clear

10/27/2010

Rain

10/28/2010

Clear

10/29/2010

Clear

10/30/2010

Cloudy

10/31/2010

Clear

 

Column = 1
Option = DESC
Include Original Data = No

Name

Count

Clear

12

Rain

7

Cloudy

5

Partly Cloudy

5

Snow

1

 
Chart Sample
 
chart
 

Sum Group Names

Group a column of strings or names by content. For each string, sum the corresponding numbers in another column. The result is returned in two columns listing each distinct string and the corresponding sum side by side. The columns are sorted by ascending or descending sum.

Parameter Set

Parameters Description
Column Column used to group by string. Column numbers begin with zero
Column to Aggregate Column used to sum numbers corresponding to content of first column. Column numbers begin with zero
Option Sort data by ascending (ASC), NONE, or descending (DESC) count
Include Original Data If “Yes” include the original dataset in the result table

 
Applications

Use to add up all transactions on a given day, total the revenue for a given product/sales person/division, sum all the defects for a given process, etc. Many other uses.

Data Sample

Input Parameter Result

day

amount

3/1/2010

20.23

3/1/2010

173.14

3/1/2010

193.12

3/1/2010

45.9

3/1/2010

76.34

3/1/2010

87

3/2/2010

233

3/2/2010

176.29

3/3/2010

108.44

3/4/2010

68.23

3/4/2010

72.23

3/4/2010

124.94

3/5/2010

133.76

3/6/2010

120

3/6/2010

188.33

3/6/2010

103.87

3/6/2010

122.22

3/7/2010

77.23

3/7/2010

99.81

3/7/2010

21.72

3/7/2010

100.02

3/7/2010

74.23

Column = 0
Column to Aggregate = 1
Sort = NO SORT
Include Original Data = No

Name

Sum

3/1/2010

595.73

3/2/2010

409.28999999999996

3/3/2010

108.44

3/4/2010

265.4

3/5/2010

133.76

3/6/2010

534.4200000000001

3/7/2010

373.01000000000005

 
Chart Sample
 
chart
 

Sort 1 Column

Sorts a single column of numbers in ascending or descending order and return the result in a column of equal length. The rest of the data, if present, will not be modified.

Parameter Set

Parameters Description
Column number Column on which to perform the sort operation. Column numbers begin with zero
Option Specify ascending (ASC) or descending (DESC) sort
Include Original Data If “Yes” include the original dataset in the result table

 

Applications

Use when a sorted version of a given column is need in addition to the original set, perhaps for menu items, different data sets, etc.

Data Sample

Input Parameter Result

date

revenue

2/1/2011

32300

2/2/2011

23445

2/3/2011

49322

2/4/2011

23009

2/5/2011

29003

2/6/2011

23994

 

Column number = 1
Option = ASC
Include Original Data = Yes

date

revenue

Result

2/1/2011

32300

23009.0

2/2/2011

23445

23445.0

2/3/2011

49322

23994.0

2/4/2011

23009

29003.0

2/5/2011

29003

32300.0

2/6/2011

23994

49322.0

 

 

Two Column Operation

Perform item by item addition, subtraction, multiplication or division with two columns of data of equal length and return the result in a column of the same length as the input columns.

Parameter Set

Parameters Description
Column 1 First column on which to perform the two-column operation. Column numbers begin with zero
Column 2 Second column on which to perform the two-column operation. Column numbers begin with zero
Operation ADD, SUBTRACT, MULTIPLY or DIVIDE
Result Column Name Name of result column
Include Original Data If “Yes” include the original dataset in the result table

 
Applications

Use to perform arithmetic between data in different columns.

Data Sample

Input Parameter Result

day

gross

cost of sale

2/1/2011

2512.23

1300

2/2/2011

3238

1258

2/3/2011

987.44

1102

2/4/2011

2368.23

1305

2/5/2011

4003.76

1320

2/6/2011

3765

1275

2/7/2011

2983.23

1305

 

Column 1 =1
Column 2 =2
Operation = SUBTRACT
Result Column Name = net
Include Original Data = Yes

day

gross

cost of sale

net

2/1/2011

2512.23

1300

1212.23

2/2/2011

3238

1258

1980.0

2/3/2011

987.44

1102

-114.55999999999995

2/4/2011

2368.23

1305

1063.23

2/5/2011

4003.76

1320

2683.76

2/6/2011

3765

1275

2490.0

2/7/2011

2983.23

1305

1678.23

 

 
Chart Sample

For this chart, we converted the cost of sale column to be a negative number using the Basic Column Math process module, which is part of the default process module set, before plotting.
 
chart