如何更改 Google Data Studio 中的文本值?

How can I change the text values in Google Data Studio?

我有一个名为 duration_type 的字段,它可以具有以下值,我想在我的图表中将它们显示为 expected_values 字段:

duration_type expected_values
weekly Week
monthly Month
annual Year

创建一个新的 expected_values 字段并创建 CASE 语句:

CASE
  WHEN duration_type = "weekly" THEN "Week"
  WHEN duration_type = "monthly" THEN "Month"
  WHEN duration_type = "annual" THEN "Year"
END