Calculation Functions Reference

<< Click to Display Table of Contents >>

Navigation:  Dashboard Designer > Data Analysis > Window Calculations >

Calculation Functions Reference

 

Calculation Functions Reference

This topic contains the descriptions of window functions that can be used to specify measure expressions.

FUNCTION

DESCRIPTION

EXAMPLE

IMAGE

Last()

Returns the number of rows from the current row to the last row in the window.

Last()

clip0125

First()

Returns the number of rows from the current row to the first row in the window.

First()

clip0126

Index()

Returns the index of the current row in the window.

Index()

clip0127

Size()

Returns the number of rows in the window.

Size()

clip0128

Lookup(SummaryExpression, Position)

Returns the value of the expression in a target position specified as a relative offset from the current position.

Lookup(Sum([Sales]), 3)

clip0129

RankCompetition(SummaryExpression, [

'asc'

'desc' ])

Returns the standard competition rank for the current row in the window.

RankCompetition(Sum([Sales]),

'asc')

RankDense(SummaryExpression, [ 'asc'

'desc' ])

Returns the dense rank for the current row in the window.

RankDense(Sum([Sales]), 'asc')

RankUnique(SummaryExpression, [ 'asc'

'desc' ])

Returns the unique rank for the current row in the window.

RankUnique(Sum([Sales]),

'asc')

RankModified(SummaryExpression, [ 'asc'

'desc' ])

Returns the modified competition rank for the current row in the window.

RankModified(Sum([Sales]),

'asc')

RankPercentile(SummaryExpression, [ 'asc'

'desc' ])

Returns the percentile rank for the current row in the window.

RankPercentile(Sum([Sales]), 'desc')

RunningAvg(SummaryExpression)

Returns the running average of the specified expression from

the first row in the window to the current row.

RunningAvg(Sum([Sales]))

clip0130

 

 

FUNCTION

DESCRIPTION

EXAMPLE

IMAGE

RunningCount(SummaryExpression)

Returns the running count of the specified expression from the first row in the window to the current row.

RunningCount(Sum([Sales]))

-

RunningMax(SummaryExpression)

Returns the running maximum

of the specified expression from the first row in the window to the current row.

RunningMax(Sum([Sales]))

clip0131

RunningMin(SummaryExpression)

Returns the running minimum

of the specified expression from the first row in the window to the current row.

RunningMin(Sum([Sales]))

clip0132

RunningSum(SummaryExpression)

Returns the running sum of the specified expression from the first row in the window to the current row.

RunningSum(Sum([Sales]))

clip0133

WindowAvg(SummaryExpression,

StartOffset, EndOffset)

Returns the average of the expression within the window, which is defined using offsets from the current row.

WindowAvg(Sum([Sales]), First(), Last())

clip0134

WindowCount(SummaryExpression,

StartOffset, EndOffset)

Returns the count of the expression within the window.

WindowCount(Sum([Sales]),

First()+2, Last())

clip0135

WindowCountDistinct(SummaryExpression,

StartOffset, EndOffset)

Returns the distinct count of the expression within the window.

WindowCountDistinct(Sum([Sales]),

First(), Last())

-

WindowMax(SummaryExpression,

StartOffset, EndOffset)

Returns the maximum of the expression within the window.

WindowMax(Sum([Sales]), First(), Last())

clip0136

WindowMin(SummaryExpression,

StartOffset, EndOffset)

Returns the minimum of the expression within the window.

WindowMin(Sum([Sales]), First(), Last())

clip0137

clip0138