計算列の例
ダッシュボードのデータは、計算列で拡張できます。各データセットには計算列のセクションがあります。計算列は、PostgreSQL 形式の SQL で作成および変更できます。
データセットへの移動
メトリックと計算式を表示・編集するには、次の手順を実行します。
- plaidcloud.com にサインインし、ダッシュボードに移動します
- visualize.plaidcloud.com で、Data > Datasets に移動します
- 表示または変更するデータセットを検索します
Actionsの下にあるeditボタンにカーソルを合わせて、データセットを変更します
COUNT(*)min("MyColumnName")max("MyColumnName")Coalesce(たとえば NULL を 0.0 に変換する場合に便利)
Section titled “Coalesce(たとえば NULL を 0.0 に変換する場合に便利)”coalesce("BaselineCost",0.0)Substring
Section titled “Substring”substring("PERIOD",6,2)CAST("YEAR" AS integer)-1Concat
Section titled “Concat”concat("Biller Entity" , ' ', "Country_biller")To_char
Section titled “To_char”to_char("date_created", 'YYYY-mm-dd')left("period",4)ゼロ除算エラーを避けるための回避策を使った除算
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" ENDconcat("Class",' > ',"Product Family",' > ',"Meta Series")