Skip to main content

totalVal

Returns the total value for a set of numbers.

The input can be a table region, a list, or a mix of both.

To sum individual numbers, use sum instead.

Parameters

  • X (table region or list)

    The first table region or list of numbers.

  • X (table region or list)

    Optional. The second table region or list of numbers.

    You can add more regions or lists as required.

Examples

Assume a "Describe the Table" project with this data:

Branch

Orders

salesRev

COGS

otherRev

otherExp

netProfit

Row 1

Aberdeen

15

14,000

8,000

2,000

1,500

6,500

Row 2

Edinburgh

35

33,000

19,000

2,000

3,500

12,500

Row 3

Inverness

18

16,000

8,250

1,200

1,500

7,450

Row 4

Glasgow

35

32,500

17,750

1,250

1,700

14,300

The input can be a single column variable.

ATL in Script

Result

[[totalVal(salesRev)]]

95,500

[[totalVal(otherRev)]]

6,450

The input can be multiple column variables.

ATL in Script

Result

[[totalVal(salesRev, otherRev)]]

101,950

[[totalVal(COGS, otherExp)]]

61,200

Note

In a "Describe Row in Context" project, the column variables are salesRevColumn, otherRevColumn, COGSColumn, and otherExpColumn.

The input can be one or more numeric lists.

ATL in Script

Result

[[list1 = (10, 30, 20, 40); list2 = (12, 48, 75, 92); totalVal(list1, list2)]]

327