我是DAX的新手。我有以下代码,但我希望所有出现的Office =“ Boston New”都被替换为“ Boston”。我尝试了SUBSTITUTE,但收到以下错误:
EVALUATE
SUMMARIZECOLUMNS(
TimeKeeper[Office],
Employee[Job Class],
TimeKeeper[Timekeeper Name],
"Hours WTD", [Hours Billed WTD],
"Hours MTD", [Hours Billed MTD],
"Hours YTD", [Hours Billed YTD],
"Hours Prior MTD", [Hours Billed Prior MTD],
"Hours Prior YTD", [Hours Billed Prior YTD])
查询(3,13)无法确定表'TimeKeeper'中'Office'列的单个值。当度量公式引用包含许多值但未指定诸如最小值,最大值,计数或总和之类的聚合的列时,就会发生这种情况。
我尝试过的事情:
EVALUATE
SUMMARIZECOLUMNS(
SUBSTITUTE(TimeKeeper[Office], "Boston New","Boston"),
Employee[Job Class],
TimeKeeper[Timekeeper Name],
"Hours WTD", [Hours Billed WTD],
"Hours MTD", [Hours Billed MTD],
"Hours YTD", [Hours Billed YTD],
"Hours Prior MTD", [Hours Billed Prior MTD],
"Hours Prior YTD", [Hours Billed Prior YTD]
)