記事:
${__field.labels.__values} # or ${__field.labels.col1}
select TIMESTAMP('2025-01-01 00:00:00') as time, 10 as cost union all select TIMESTAMP('2025-02-01 00:00:00') as time, 20 as cost
記事:
サンプルダッシュボード:
クエリ例:
SELECT TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month)) AS invoice_month, round(SUM(cost) + SUM(IFNULL((SELECT SUM(c.amount) FROM UNNEST(credits) c), 0))) AS total FROM billing-export-kii.billing.gcp_billing_export_v1_XXXX WHERE $__timeFilter(TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month))) AND cost >= 0.01 GROUP BY invoice_month ORDER BY invoice_month
SELECT TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month)) AS invoice_month, project.name AS project, round(SUM(cost) + SUM(IFNULL((SELECT SUM(c.amount) FROM UNNEST(credits) c), 0))) AS total FROM billing-export-kii.billing.gcp_billing_export_v1_XXXX WHERE $__timeFilter(TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month))) AND cost >= 0.01 AND project.name IN ($projects) AND service.description IN ($services) GROUP BY invoice_month, project ORDER BY invoice_month, project
SELECT TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month)) AS invoice_month, service.description AS service, round(SUM(cost) + SUM(IFNULL((SELECT SUM(c.amount) FROM UNNEST(credits) c), 0))) AS total FROM billing-export-kii.billing.gcp_billing_export_v1_XXXX WHERE $__timeFilter(TIMESTAMP(PARSE_DATETIME("%Y%m", invoice.month))) AND cost >= 0.01 AND project.name IN ($projects) AND service.description IN ($services) GROUP BY invoice_month, service ORDER BY invoice_month, service