Skip to main content

maxVal

Returns the maximum value in a set of numbers.

Empty or null values are ignored.

Parameters

  • X (number, list, or table region)

    A number, list, or table region.

  • X (number, list, or table region)

    Optional. Additional numbers, lists, or regions.

Examples

These examples cover the basic functionality:

ATL in Script

Result

Notes

[[maxVal(10, 40, 20, 30)]]

40

The input set is four numbers.

[[maxVal((10, 40, 20, 30))]]

40

The input set is a list of numbers.

[[maxVal(10, (40, 50, 30))]]

50

The input set is one number and one list.

[[maxVal((10, 50, 90), (40, 30, 60))]]

90

The input set is two lists.

More typically, the input is a table region or list.

Using maxVal with table data

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

You can search a single column.

ATL in Script

Result

[[maxVal(Orders)]]

35

[[maxVal(salesRev)]]

33,000

Note

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

You can also search a multi-column region.

ATL in Script

Result

[[maxVal(salesRev, otherRev)]]

33,000

[[maxVal(COGS, otherExp)]]

19,000

Use maxVal with rows to interrogate specific rows.

ATL in Script

Result

[[maxVal(rows('Aberdeen'))]]

14,000

[[maxVal(rows('Aberdeen', 'Edinburgh'))]]

33,000