계산된 열 예제
대시보드의 데이터는 계산된 열로 보강할 수 있습니다. 각 데이터셋에는 계산된 열 섹션이 있습니다. 계산된 열은 PostgreSQL 방식의 SQL로 작성하고 수정할 수 있습니다.
데이터세트로 이동
지표와 계산식을 보고 편집하려면 다음 단계를 수행합니다.
- plaidcloud.com에 로그인하고 대시보드로 이동합니다.
- visualize.plaidcloud.com에서 Data > Datasets로 이동합니다.
- 보거나 수정할 데이터세트를 검색합니다.
Actions아래의edit버튼 위에 마우스를 올려 데이터세트를 수정합니다.
Count
섹션 제목: “Count”COUNT(*)Min
섹션 제목: “Min”min("MyColumnName")Max
섹션 제목: “Max”max("MyColumnName")Coalesce (예: Null을 0.0으로 변환할 때 유용)
섹션 제목: “Coalesce (예: Null을 0.0으로 변환할 때 유용)”coalesce("BaselineCost",0.0)Substring
섹션 제목: “Substring”substring("PERIOD",6,2)Cast
섹션 제목: “Cast”CAST("YEAR" AS integer)-1Concat
섹션 제목: “Concat”concat("Biller Entity" , ' ', "Country_biller")To_char
섹션 제목: “To_char”to_char("date_created", 'YYYY-mm-dd')Left
섹션 제목: “Left”left("period",4)나눗셈
섹션 제목: “나눗셈”0으로 나누기(DIV/0) 오류를 피하기 위한 우회 방법을 사용한 나눗셈
sum("so_infull")/(count(*)+0.00001)조건문
섹션 제목: “조건문”CASE WHEN "Field_A"= 'Foo' THEN max(coalesce("Value_A",0.0)) - max(coalesce("Value_B",0.0)) ENDCASE WHEN "sol_otif_pod_missing" = 1 THEN'POD is missing.'ELSE'POD exists.'ENDcase when "Customer DC" = "origin_dc" or "order_reason_type" = 'Off Schedule' or "mot_type" = 'UPS' then 'Yes'else 'No'endCASE WHEN "module_type" is NULL THEN '---' ELSE "module_type" ENDCASE WHEN "NODE_TYPE" = 'External' THEN '3rd Party' ELSE "ENTITY_LOCATION_DESCRIPTION" END문자열 연결
섹션 제목: “문자열 연결”concat("Class",' > ',"Product Family",' > ',"Meta Series")