Formula Mappings

Most of the computed items that comprise computed item expressions can be mapped directly to Excel functions. Certain functions have different numbers of arguments or argument order and require additional processing.

The following table shows which Interactive Reporting computed items map to Excel formulas.

Table 3.  Computed Items to Excel Function Comparison of HTML File Formats 

Interactive Reporting Computed Item

Microsoft Excel Function

Implementation

Aggregation

Decode

H_Decode

VBA

 

Nvl

Limited support: Nvl(column, expr).

Excel

 

AddMonth

H_AddMonth

VBA

 

DayOfMonth

DAY

Excel

 

LastDay

H_LastDay

VBA

 

MonthsBetween

H_MonthsBetween

VBA

 

NextDay

H_NextDay

VBA

 

Sysdate

NOW

Excel

 

ToChar(value, format)

Limited Support: Excel’s built-in TEXT(val, format) function is used and the format argument is translated from the Reporting and Analysis format into Excel’s on the formula generation time. Consequently, the format should always be a constant string literal.

Excel

 

ToChar(column)

When the argument for ToChar is a column reference, it is converted to TEXT(column, format), where format is one of real, int, or date_format depending on the column type.

  

ToDate(x)

(DATEVALUE(x) + TIMEVALUE(x))

Excel

 

ToMonth

H_ToMonth

VBA

 

ToQtr

H_ToQtr

VBA

 

ToYear

YEAR

Excel

 

Abs

ABS

Excel

 

Atn

ATAN

Excel

 

Ceil

H_Ceil

VBA

 

Cos

COS

Excel

 

Cosh

COSH

Excel

 

Exp

EXP

Excel

 

Floor

H_Floor

Excel

 

Ln

LN

Excel

 

Log

LOG

Excel

 

Log10

LOG10

Excel

 

Max

MAX

Excel

 

Min

MIN

Excel

 

Mod

H_MOD

VBA

 

Power

POWER

Excel

 

Round

ROUND

Excel

 

Sign

SIGN

Excel

 

Sin

SIN

Excel

 

Sinh

SINH

Excel

 

Tan

TAN

Excel

 

Tanh

TANH

Excel

 

Trunc

TRUNC

Excel

 

Avg

H_Avg

VBA

*

AvgNonNull

AVERAGE

Excel

*

Chr

H_Chr

VBA

 

ColMax

H_ColMax

VBA

*

ColMin

H_ColMin

VBA

*

Count

H_Count

VBA

*

CountDistinct

H_CountDistinct

Limited Support: Can be used in a break or grand totals only. There may be performance considerations associated with this computed item because it uses heavy computations.

VBA/Excel

*

CountNonNull

COUNTA

Excel

*

CountNull

H_CountNull

VBA

*

Cume

Computed Items with expressions that have exactly one call to Cume() and nothing else. Example: “Cume(Units)”

Excel/VBA

Aggregation and cross references in rows

Next

Function call is converted to appropriate cell reference.

Limited support: Cannot be used in a Break or Grand Total expression.

Excel/VBA

Cross references in rows

Prior

Function call is converted to appropriate cell reference.

Limited support: Cannot be used in a break or grand total expression.

Excel

Cross references in rows

Sum

Use Excel’s SUM() for non-string columns.

String columns exception: H_SumStr() is used. Can be used in break and grand totals only. There may be performance considerations associated with this computed item because it uses heavy computations.

Excel/VBA

*

Median

MEDIAN

Excel

*

Mode

H_Mode

Mode maps to Excel’s H_Mode because Excel’s MODE does not support complex ranges. Mode can only be used in break or grand totals. There may be performance considerations associated with this computed item because it uses heavy computations.

VBA

*

Percentile

H_Percentile

VBA

*

Rank(column)

H-Rank

Rank maps to Excel’s H_Rank function. Rank can only be used in break or grand total expressions. There may be performance considerations associated with this computed item because it uses heavy computations.

VBA

*

RankAsc(column)

H-RankAsc

This function can only be used in break or grand totals expressions. There may be performance considerations associated with this computed item because it uses heavy computations.

VBA

*

StdDev

H-StdDev

VBAl

*

StdDevp

H_StdDevp

VBA

*

Var

Var

VBA

*

Varp

Varp

VBA

*

Ascii

CODE

Excel

 

Concat

CONCATENATE

Excel

 

Initcap

H_Initcap

VBA

 

Instr

H_Instr

VBA

 

Length

LEN

Excel

 

Lower

LOWER

Excel

 

Ltrim

H_Ltrim

VBA

 

Replace

H_Replace

VBA

 

Rtrim

H_Rtrim

VBA

 

Substr

MID

Excel

 

Translate

H_Translate

VBA

 

Upper

UPPER

Excel

 

MovingAvg

H_MovingAvg

VBA

Cross references in rows

MovingDiff

H_MovingDiff

VBA

Cross references in rows

MovingMax

H_MovingMax

VBA

Cross references in rows

MovingMed

H_MovingMed

VBA

Cross references in rows

MovingMin

H_MovingMin

VBA

Cross references in rows

MovingSum

H_MovingSum

VBA

Cross references in rows

All aggregate functions with two and three arguments: Ex. Sum(col, break_col, break_value)

When two argument functions are used in break or grand total expressions and the second argument is ‘Breaks’, most of the functions are converted to their built-in Excel equivalents. Otherwise, the function is substituted with the appropriate H_xxx() VBA function.

Excel/VBA