Easy Heading Macro | ||||||
---|---|---|---|---|---|---|
|
...
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 | Return Returns whether the field is in the Row area. | Boolean | AreaIsRow([COMPANY]) IF( AreaIsRow([COMPANY]) , SUM([Units]) , 0) | |
AreaIsColumn | Return Returns whether the field is in the Column area. | Boolean | AreaIsColumn([COMPANY]) | |
AreaIsDate | Return Returns whether the field is in the Date area. | Boolean | AreaIsDate([COMPANY]) | |
AreaIsFilter | Return Returns whether the field is in the Filter area. | Boolean | AreaIsFilter([COMPANY]) | |
AreaIsHidden | Return Returns whether the field is hidden. | Boolean | AreaIsHidden([COMPANY]) | |
getRecordValue | Return 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”“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현재 OLAP의 배치를 기준으로 Row Area에 있는 필드의 목록을 반환합니다 | Returns list of fields based on the current OLAP placement in the row area. | Object | GetRowFields("[dimension1];[dimension2]") | |
GetColumnFields현재 OLAP의 배치를 기준으로 Column Area에 있는 필드의 목록을 반환합니다 | 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 현재 셀의 Row 위치 순서 값을 반환합니다. (내부 인덱스를 반환합니다.) | 위치는 0부터 시작합니다Returns the row index of the current cell. Index starts from 0. | Integer | RowIndex() | |
ColumnIndex 현재 셀의 Column 위치 순서 값을 반환합니다.(내부 인덱스를 반환합니다.) | 위치는 0부터 시작합니다Returns the column index of the current cell. Index starts from 0. | Integer | ColumnIndex() | |
GetVariationValue | 주어진 필드의 2차 함수를 적용한 값을 반환 합니다. | 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 | 팩트 테이블과 팩트 테이블 간의 1:N 관계에서 1의 특정 값을 중복 적용하는 것을 방지합니다. | Integer | InDimension("[FIELD_NAME1];[FIELD_NAME2]", [Measure]) | |
Convertor | ToString | 해당 값을 문자열로 변환 합니다, 포멧은 수치형 포멧 및 일자형 포멧을 사용하실 수 있습니다. 포멧은 생략하실 수 있습니다. | String | ToString(value, [string format]) ToString(123456789, "#,##0") -> 123,456,789 ToString( 0.12 , "P2") -> "12.00 %“ ToString( 123456.789 , "#,###.###") -> "123,456.000" |
ToNumber | 해당 값을 숫자형으로 변환 합니다. | Double | ToNumber(value) ToNumber("123") -> 123 ToNumber( "123.12" , 0) -> 123.12 ToNumber( "Matrix" , 0) -> 0 | |
ToDate | 해당 값을 날짜형으로 변환 합니다. | DateTime | ToDateToString(value, [string format]) ToDate(new Date(), "yyyy-MM-dd") -> 2020-12-31 | |
Logical | AND | 여러 조건 값들에 대한 AND 연산 합니다. | Boolean | AND(boolean, boolean, …) IF ( AND( true, 1==1 , "Korea" == "Korea") , 1 , 0) -> 1 |
OR | 여러 조건 값들에 대한 OR 연산 합니다. | Boolean | OR(boolean, boolean, …) IF ( OR( 1==2 , "Korea" == "Korea") , 1 , 0) =>1 | |
InNull | 검사 대상 값이 null 값인지 여부를 반환합니다 | Boolean | IsNull(value) IsNull( 100 ) => false IsNull( "Korea" ) => false | |
IsBool | 검사대상 값이 Boolean 타입여부를 반환 합니다. | Boolean | IsBool(value) IsBool(1) IsBool(true) | |
IsNumber | 검사대상 값이 숫자면 True 반환 합니다. | Boolean | IsNumber(value) IsNumber( "100" ) => true IsNumber( 100 ) => true IsNumber( "Korea" ) => false | |
IsString | 검사대상 값이 문자열이면 True 반환 합니다. | Boolean | IsString(value) IsString("Korea") => true IsString(null) => false | |
IsDateTime | 검사대상 값이 날짜 면 True 반환 합니다. | Boolean | IsDateTime(value) IsDateTime(DATE(2013, 12,12)) => true IsDateTime( "2013-12-12" ) => false | |
Character | Left | 원본 문자열에서 좌측으로 부터 n개 만큼의 길이를 가지는 새로운 문자열을 반환합니다. | String | Left( "Hello Matrix", 1) -> "H“ DistinctCount( Left( [Num_Field] , 3) ) |
Right | 원본 문자열에서 우측으로 부터 n개 만큼의 길이를 가지는 새로운 문자열을 반환합니다. | String | Right( "Hello Matrix", 6) -> "Matrix“ Max( Right( [Num_Field] , 1) ) | |
Len | 전달받은 문자열의 길이를 반환합니다. | Integer | Len( "Hello Matrix") -> 12 Sum( Len( [Company] ) ) | |
Lower | 전달받은 문자열을 소문자로 변환한 문자열을 반환합니다. | String | Lowser( "Hello Matrix") -> "hello matrix" | |
Find | 원본 문자열의 특정 위치로 부터 대상 문자열을 검색하여 해당 인덱스를 반환합니다. 검색 대상이 없을 경우 -1를 반환합니다. | 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 객체를 반환합니다. |
...