페이지 트리

버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
댓글: 일부 영문 번역(OLAP Function, Character 작업 중)

...

Using Formula Editor via Popup Menu


펼치기
title수식 작성 예시Formula Example

1)  Rank Function

      Rank([Company],"[Current Month Performance]", false) Ranks companies in descending order


2)  Subtotal Percent by Row

      SUM([Sales Plan]) / SUM ( ForAll ( "[Product Name]","[Sales Plan]") )  * 100


3) Proportion Against Specific Amount or Item

       SUM([Current Month Performance]) / SUM( GetMembers([Specific Dimension],"Item Name", [Current Month Performance],""))

                SUM([Amount]) / SUM( GetMembers( [Account],"Sales"  , [Amount] ,""))                        /* Sales Composition Ratio */


 4)  Compostion Rate / Achievement Rate / Growth Rate

       Composition Difference YoY                  :  GetMembers([Performance Type], "This Year Actual") - GetMembers([Performance Type], "Last Year Actual")

       Achievement Rate vs Plan                      :  GetMembers([Performance Type], "This Year Actual") / GetMembers([Performance Type], "This Year Actual") * 100

       Growth Rate YoY                      :  GetMembers([Performance Type], "This Year Actual") / GetMembers([Performance Type], "Last Year Actual") * 100 - 100

     

5) Signal Icon by Achievement Rate

      SWITCH(

            SUM([Progress]) >100,   IMG("ccf744727425e432.PNG",  16, 16),

             IMG("b6b4d58a2ce73cbf7.PNG", 16, 16)

     )


6) Division Error Handling

       IF( ToNumber( SUM([VAL2]), 0) == 0,    , 0   , Sum([VAL1]) / SUM([VAL2])  )

       IF(  OR(  IsNull(SUM([NO2])) , SUM([NO2])  == 0) , 0    , SUM([NO1]) / SUM([NO2])    )


7) Custom Field Using Dimension Logic

Switch(

     AND(getRowString("CUSTOMER") == "Anam", MID(getRowString("PRODUCT"), 0,1) == "T")  , "Anam Electronics T~"

   ,  getRowString("CUSTOMER") == "Anam"  , "Anam Electronics not T~"

   ,  getRowString("CUSTOMER") == "Samsung" , "Samsung Electronics"

  , "Other Overseas"

)


8) Display Image Based on Sales Threshold ( Sales > 15000)

 IF(Sum([Act.])>=15000, IMG("arrow_up.png", 16, 16), IMG("arrow_down.png", 16, 16))

...

Category

Name

Description

Return Type

Usage






















Olap

AreaReturns 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)

IntegerAreaIndex([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.

ObjectIF(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)

BooleanIsHeaderTotal([Field])
InDimension팩트 테이블과 팩트 테이블 간의 1:N 관계에서 1의 특정 값을 중복 적용하는 것을 방지합니다Prevents duplicate application of a specific value from the “1” side in a 1:N relationship between fact tables.IntegerInDimension("[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여러 조건 값들에 대한 AND 연산 합니다

Performs logical AND on multiple conditions.

Boolean

AND(boolean, boolean, …)

IF ( AND( true, 1==1 , "Korea" == "Korea") , 1 , 0)     -> 1

OR여러 조건 값들에 대한 OR 연산 합니다

Performs logical OR on multiple conditions.

Boolean

OR(boolean, boolean, …)

IF ( OR( 1==2 , "Korea" == "Korea") , 1 , 0) =>1

InNull검사 대상 값이 null 값인지 여부를

반환합니다Checks whether the given value is null.

Boolean

IsNull(value)

IsNull( 100 ) => false

IsNull( "Korea" ) => false

IsBool

검사대상 값이 Boolean 타입여부를 반환

합니다Returns whether the given value is of Boolean type.


Boolean

IsBool(value)

IsBool(1)

IsBool(true)

IsNumber검사대상 값이 숫자면 True 반환 합니다

Returns true if the given value is a number.

Boolean

IsNumber(value)

IsNumber( "100" )  => true

IsNumber( 100 )  => true

IsNumber( "Korea" )  => false

IsString검사대상 값이 문자열이면 True 반환 합니다

Returns true if the value is a string.

Boolean

IsString(value)

IsString("Korea") => true

IsString(null) => false

IsDateTime검사대상 값이 날짜 면 True 반환 합니다

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원본 문자열에서 좌측으로 부터 n개 만큼의 길이를 가지는 새로운 문자열을 반환합니다

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원본 문자열에서 우측으로 부터 n개 만큼의 길이를 가지는 새로운 문자열을 반환합니다

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

원본 문자열의 특정 위치로 부터 대상 문자열을 검색하여 해당 인덱스를 반환합니다.

검색 대상이 없을 경우 -1를 반환합니다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


FALSEBoolean 유형의 False를 반환합니다.


Boolean


TRUEBoolean 유형의 true 을 반환합니다.
NULLnull 객체를 반환합니다.

...