OlapGrid is used when creating new analysis items or data items and defining their data values.
- New Item Creation : Planned Ratio = Actual / Sales Plan
Formula Editor
① Calculated Field ② Formula Editing Function Display Panel ③ Formula Input Panel ④ Function Help Panel
1) Provided Information
- A list of fields, functions, and operators for defining calculation formulas
- Define calculation formulas in the Formula panel
- Help is provided for the selected item (field, function, operator)
2) Formula Editor User Guide
- [ Popup Menu ] - [ Create calculated field ]
- [ Popup Menu ] - [ Custom Items ] - [ Filter Equations ]
- [ Popup Menu ] - [ Custom Items ] - [ Aggregation Formula ]
- [ Popup Menu ] - [ Design ] - [ Field ] - [ Formula ]
- [ Popup Menu ] - [ Design ] - [ Field ] - [ Header Visibility Formula ]
- [ Popup Menu ] - [ Design ] - [ Style ] - [ Conditional Formatting ]
Using Formula Editor via Popup Menu
Formula Editor Function - Aggregate Functions
Category | Name | Description | Return Type | Usage |
---|---|---|---|---|
Aggregate | Average | Returns the average of the specified field. | Double | Average([MEASURE]) Average(100, 120, 100, 120) Average( Sum([MEASURE]), 120, 100, 120) |
Sum | Returns the total (sum) of the specified field. | Double | SUM([Sales]) SUM( SUM([Sales]) + MAX([Difference]) ) | |
Count | Returns the count of the specified field. | Double | Count([MEASURE]) Count, 120, 100, 120) Count( Sum([MEASURE]), 120, 100, 120) | |
Max | Returns the maximum value. Supports numeric and string values. For strings, the last value in ascending order is returned. | Object | Max([Sales]) Max([FIELD_NAME]) Max("Hello", "Abc", "Old", "ZIndex") Max( Max([FIELD_NAME]), 120, 100, 120) | |
Min | Returns the minimum value. Supports numeric and string values. For strings, the first value in ascending order is returned. | Object | Min([Sales]) Min([FIELD_NAME]) Min("Hello", "Abc", "Old", "ZIndex") Min( Max([FIELD_NAME]), 120, 100, 120) | |
DistinctCount | Returns the count of unique (distinct) values from the field in the dataset. | Double | DistinctCount([Product Group]) | |
Condition | IF | Performs a conditional check. Returns trueValue if the condition is true, otherwise returns falseValue. | Object | IF( 1 > 2 , "1 is greater than 2" , "1 is less than 2") |
SWITCH | Sequentially evaluates conditions and returns the value of the first true condition. A default value is returned if all are false. | Object | Switch( ToString(getRecordValue([PRODUCT])) == "BW1000" , Sum([H_VAL]) , ToString(getRecordValue([PRODUCT])) == "BW2000" , Sum([Y_VAL]) , Sum([Q_VAL]) ) |
Formula Editor Function - Olap Function
Category | Name | Description | Return Type | Usage |
---|---|---|---|---|
Olap | Area | Returns the area where the field is placed. (Row:1,Column:2,Filter:3,Data:4) | Integer | Area([COMPANY]) |
AreaIndex | Returns the index of the field in its area. (Index value starts at 0) | Integer | AreaIndex([COMPANY]) | |
AreaIsRow | Returns whether the field is in the Row area. | Boolean | AreaIsRow([COMPANY]) IF( AreaIsRow([COMPANY]) , SUM([Units]) , 0) | |
AreaIsColumn | Returns whether the field is in the Column area. | Boolean | AreaIsColumn([COMPANY]) | |
AreaIsDate | Returns whether the field is in the Date area. | Boolean | AreaIsDate([COMPANY]) | |
AreaIsFilter | Returns whether the field is in the Filter area. | Boolean | AreaIsFilter([COMPANY]) | |
AreaIsHidden | Returns whether the field is hidden. | Boolean | AreaIsHidden([COMPANY]) | |
getRecordValue | Returns the first value from the cell's record. | Object | getRecordValue([FIELD_NAME]) getRecordValue([COMPANY]) | |
HeaderText | Returns the display text of the header(row/column field). When the field mentioned is not in the header area return blank. | String | HeaderText([FIELD_NAME]) HeaderText([COMPANY]) | |
ForAll | Allows access to upper group totals by excluding dimensions. | Record Array | Sum([Units]) / ForAll("[Company];[Locale]", "[Units]", false) | |
ForEach | Adds dimensions for lower group totals. | Record Array | Average(ForEach("[Locale]", "[Avg. Units]")) | |
InList | Checks if field value is in a given list. | Boolean | InList([FIELF_NAME], "Category1", "Category2") Sum(IF(InList(Locale],”Korea”,”China”),[Units],0)) | |
Match | Matches the text pattern. *(case-sensitive) | Boolean | *a : Boolean that ends with 'a' a* : Boolean that starts with 'a' *a* : Boolean that includes 'a' | |
GetMembers | Retrieves values matching keyword. | Record Array | GetMembers([SEARCH_FIELD_NAME], string keyword, [VALUE_FIELD_NAME]) GetMembers([Locale], “Korea”,[Units], “”) | |
Rank | Ranks items by specific field. Identical values are ranked the same. Measure field names are considered String. | Integer | Rank([DIMENSION], "[MEASURE]", isTop) Rank([Locale], "[Units]", false) | |
Rankln | Automatically ranks in current layout. Identical values are ranked the same. Measure field names are considered String. | Integer | RankIn([MEASURE], "[Row=1, Column=2]", isTop) | |
IMG | Displays image in cell. Location of the image is defined as the uploaded image's name. | Object | IF(Sum([MEASURE]) > 2000, IMG("FILENAME", 16, 16),"FILENAME") | |
GetRowFields | Returns list of fields based on the current OLAP placement in the row area. | Object | GetRowFields("[dimension1];[dimension2]") | |
GetColumnFields | Returns list of fields based on the current OLAP placement in the column area. | Object | GetColumnFields("[dimension1];[dimension2]") | |
CellValueByOffset | Gets value from cell's current offset position. e.g.) Calculate the year-over-year (YoY) change rate. *Parameter 1. offsetRow(int) : Row offset value 2. offsetColumn(int) : Column offset value | Object | IF(Columnindex()>1, CellValueByOffset(0,-1)-CellValueByOffset(0,-3),”-”) | |
RowIndex | Returns the row index of the current cell. Index starts from 0. | Integer | RowIndex() | |
ColumnIndex | Returns the column index of the current cell. Index starts from 0. | Integer | ColumnIndex() | |
GetVariationValue | Returns the secondary calculation value applied to the given field. e.g. Subtotal calculation | Object | GetVariationValue("[FIELD_NAME]", bool SubTotalSummaryType) | |
IsHeaderTotal | Returns whether the cell is a subtotal or total value of the field. (True : Total value cell, False : Regular value cell) | Boolean | IsHeaderTotal([Field]) | |
InDimension | Prevents duplicate application of a specific value from the “1” side in a 1:N relationship between fact tables. | Integer | InDimension("[FIELD_NAME1];[FIELD_NAME2]", [Measure]) | |
Convertor | ToString | Converts the given value to a string. You can apply numeric or date formatting, or leave out the format entirely. | String | ToString(value, [string format]) ToString(123456789, "#,##0") -> 123,456,789 ToString( 0.12 , "P2") -> "12.00 %“ ToString( 123456.789 , "#,###.###") -> "123,456.000" |
ToNumber | Converts the given value to a numeric type. | Double | ToNumber(value) ToNumber("123") -> 123 ToNumber( "123.12" , 0) -> 123.12 ToNumber( "Matrix" , 0) -> 0 | |
ToDate | Converts the given value to a date format. | DateTime | ToDateToString(value, [string format]) ToDate(new Date(), "yyyy-MM-dd") -> 2020-12-31 | |
Logical | AND | Performs logical AND on multiple conditions. | Boolean | AND(boolean, boolean, …) IF ( AND( true, 1==1 , "Korea" == "Korea") , 1 , 0) -> 1 |
OR | Performs logical OR on multiple conditions. | Boolean | OR(boolean, boolean, …) IF ( OR( 1==2 , "Korea" == "Korea") , 1 , 0) =>1 | |
InNull | Checks whether the given value is null | Boolean | IsNull(value) IsNull( 100 ) => false IsNull( "Korea" ) => false | |
IsBool | Returns whether the given value is of Boolean type. | Boolean | IsBool(value) IsBool(1) IsBool(true) | |
IsNumber | Returns true if the given value is a number. | Boolean | IsNumber(value) IsNumber( "100" ) => true IsNumber( 100 ) => true IsNumber( "Korea" ) => false | |
IsString | Returns true if the value is a string. | Boolean | IsString(value) IsString("Korea") => true IsString(null) => false | |
IsDateTime | Returns true if the value is a DateTime type. | Boolean | IsDateTime(value) IsDateTime(DATE(2013, 12,12)) => true IsDateTime( "2013-12-12" ) => false | |
Character | Left | Returns a substring from the left side of the source string with a specified length. | String | Left( "Hello Matrix", 1) -> "H“ DistinctCount( Left( [Num_Field] , 3) ) |
Right | Returns a substring from the right side of the source string with a specified length. | String | Right( "Hello Matrix", 6) -> "Matrix“ Max( Right( [Num_Field] , 1) ) | |
Len | Returns the number of characters in the string. | Integer | Len( "Hello Matrix") -> 12 Sum( Len( [Company] ) ) | |
Lower | Returns the string in lowercase. | String | Lowser( "Hello Matrix") -> "hello matrix" | |
Find | Returns the index of the search string from the source string starting at a given position. Returns -1 if not found. | String | Find("Hello Matrix", "Matrix", 0) -> 6 Find("Hello Matrix", "Kyoung", 0) -> -1 | |
Mid / Substring | 원본 문자열의 특정 위치로 부터 nCount만큰의 문자열을 반환합니다. Mid와 Substring는 동일한 함수입니다. | String | Mid("Hello Matrix", 0, 5) ->: "Hello" Mid("Hello Matrix", 6, 6) : "Matrix" | |
Replace / Substitute | 원본 문자열의 oldText를 newText로 치환한 문자열을 반환합니다. Replace와 Substitute는 동일한 함수입니다. | String | Replace("Hello Matrix", "Hello", "Hi") -> "Hi Matrix" | |
Trim | 원본 문자열의 시작과 종료 부분에 공백을 모두 제거한 문자열을 반환합니다. | String | Trim( " Hello World ! ") -> "Hello World | |
Upper | 전달받은 문자열을 대문자로 변환한 문자열을 반환합니다. | String | Upper( "Hello Matrix") -> "HELLO MATRIX" | |
Numeric | ABS | 해당 값의 절대값 반환 합니다 | Double | ABS(Sum([전년대비])) |
ACOS | 해당 값의 역코사인값 반환 합니다. | Double | ACOS(Sum([전년대비])) | |
ASIN | 해당 값의 역사인값 반환 합니다. | Double | ASIN(Sum([전년대비])) | |
ATAN | 해당 값의 역탄젠트값 반환 합니다. | Double | ATAN(Sum([전년대비])) | |
CEIL | 해당 값의 올림값을 반환 합니다. | Double | CEIL([계획비]) | |
COS | 해당 값의 코사인값을 반환 합니다. | Double | ACOS(Sum([전년대비])) | |
EXP | 자연로그의 밑 e의 해당값의 제곱 값을 반환 합니다. | Double | EXP(Sum([생산비율])) | |
FLOOR | 해당 값의 내림값을 반환 합니다. | Double | FLOOR(Sum([계획비])) | |
LOG | 해당값의 대수(Logarithm-밑-지정값)를 반환 합니다. | Double | LOG([매출액], 2) | |
LOG10 | 해당값의 대수(Logarithm-밑10)를 반환 합니다. | Double | LOG10([매출액]) | |
RAND | 0에서 지정값 사이의 난수를 반환합니다. (지정값이 없을 경우, 1로 자동설정) | Double | RAND() :0~1 사이의 난수 RAND(10) :0~10 사이의 난수 | |
ROUND | 해당값의 지정된 자리수로 표현된 반올림된 값을 반환 합니다. | Double | ROUND(105.6,1) à106 | |
SIN | 해당 값의 사인값을 반환 합니다. | Double | SIN(Sum([전년대비])) | |
TAN | 해당 값의 탄젠트값을 반환 합니다. | Double | TAN(Sum([전년대비])) | |
Date Time | NOW | 현재 시스템의 날자와 시간을 반환합니다. | DateTime | NOW() -> 20201231170409448 |
TODAY | 현재 시스템의 날자를 반환합니다. 시간은 00:00:00으로 설정 됩니다. | DateTime | TODAY() -> 20201231 | |
YEAR | 대상 날자의 년도를 반환합니다. | Integer | YEAR(TODAY()) -> 2020 | |
MONTH | 해당 일자의 월을 반환 합니다. 값은 1~12의 값을 가지게 됩니다. | Integer | MONTH(ToDate("2012-05-05") ) -> 5 | |
DAY | 해당 일자의 일을 반환 합니다. | Integer | DAY(ToDate("2020-05-30") ) ->30 | |
WEEKDAY | 해당 일자의 요일에 해당하는 상수값을 반환합니다. Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6 | Integer | WEEKDAY(NOW()) WEEKDAY(ToDate("2020-08-01")) -> 6 | |
HOUR | 대상 시간의 시간 값을 반환합니다. 값은 0~23의 값을 가지게 됩니다. | Integer | HOUR(NOW()) HOUR(ToDate(getRecordValue([납기일]))) | |
MINUTE | 대상 시간의 분 값을 반환합니다. 값은 0~59의 값을 가지게 됩니다. | Integer | MINUTE(NOW()) MINUTE(ToDate(getRecordValue([납기일]))) | |
SECOND | 대상 시간의 초 값을 반환합니다. 값은 0~59의 값을 가지게 됩니다. | Integer | SECOND(ToDate(getRecordValue([CREATE_DATE]))) | |
DATEADD | 해당 일자에 특정 단위의 일자(시간)을 더한 일자를 반환합니다. *날자 단위 상수 dtYear : 년 dtQuarter : 분기 dtMonth : 월 dtDay : 일수 dtHour : 시간 dtMinute : 분 dtSecond : 초 | DateTime | 현재 일자에 1년을 추가한 일자를 반환한다. DATEADD(dtYear,1, NOW()) -> 2021 DATEADD(dtYear, 1, DATE(2020, 04, 01)) -> 2021-04-01 오전 12:00:00 DATEADD(dtMonth, -1, DATE(2020, 04, 01)) -> 2020-03-01 오전 12:00:00 | |
DATEDIFF | 일자 간 차이 값을 반환 합니다. *날자 단위 상수 사용 | Integer | DATEDIFF(dtYear, DATE(2000, 04, 01), DATE(2015, 04, 01)) -> 15 DATEDIFF(dtMonth, DATE(2000, 04, 01), DATE(2015, 04, 01)) -> 180 DATEDIFF(dtDay, NOW(), ToDate(“2013-05-05”)) | |
DATEPART | 일자의 각 파트에 해당 하는 값을 반환합니다. *날자 단위 상수 사용 | Integer | DATEPART(dtYear, DATE(2000, 04, 01) ) -> 2000 DATEPART(dtMonth, DATE(2000, 04, 01) ) -> 4 | |
DATE | 넘겨진 파라미터 값을 가지로 새로운 일자를 반환합니다. 4~6 (시,분,초)는 옵션입니다. | DateTime | DATE(2020,2,21) -> : 2020-02-21일을 반환 DATE(2020, 04, 01, 12, 30, 12) -> 2020-04-01 12:30:12 반환 | |
Operators | + | 더하기 | ||
- | 빼기 | |||
* | 곱하기 | |||
/ | 나누기 | |||
% | 비율값 계산 (%로 출력) | |||
^ | 승산 | |||
() | 괄호 | |||
< | 작다 | |||
> | 크다 | |||
<= | 작거나 같다 | |||
>= | 크거나 같다 | |||
!= | 같지 않다. | |||
! | 아니다. | |||
== | 같은가 | |||
AND | And | |||
OR | Or | |||
/**/ | 두줄 이상의 텍스트 주석 처리 | |||
// | 한줄 텍스트 주석 처리 | // 한 줄 주석문 | ||
Constant | IsRowGrandTotal | 데이터 셀의 Row 헤더가 총계인지 여부 | Boolean | Switch(IsRowGrandTotal, Average( [Y_VAL]) , IsColGrandTotal, Average( [Y_VAL]) , IsRowTotal, Average( [Y_VAL]) , IsColTotal , Average( [Y_VAL]) ,Sum( [Y_VAL]) ) |
IsColGrandTotal | 데이터 셀의 Column 헤더가 총계인지 여부 | Boolean | ||
IsRowTotal | 데이터 셀의 Row 헤더가 소계인지 여부 | Boolean | ||
IsColTotal | 데이터 셀의 Column 헤더가 소계인지 여부 | Boolean | ||
IsTotal | 데이터 셀의 헤더가 소계인지 여부 | Boolean | ||
IsGrandTotal | 데이터 셀의 헤더가 총계인지 여부 | Boolean | ||
IsTotalOrGrandTotal | 데이터 셀의 헤더가 총계 또는 소계 인지 여부 | Boolean | ||
CELL_VALUE | 데이터 셀의 값 | Object | ||
FILED_KEY | 데이터 셀의 데이터 필드의 키값 | String | ||
FILED_LABEL | 데이터 셀의 데이터 필드의 표시명 | String | ||
FALSE | Boolean 유형의 False를 반환합니다. | Boolean | ||
TRUE | Boolean 유형의 true 을 반환합니다. | |||
NULL | null 객체를 반환합니다. |
When multiple Measure fields exist, the report will repeat for each Measure field. In cases where some Measures need to be hidden based on user requirements
for specific paths, you can modify the report using Header Visibility Formula.