答案 0 :(得分:0)
您应该可以执行以下操作:
SumOrdval =
VAR RelatedCity = LOOKUPVALUE(Customer[Citycode], Customer[Cno], Sales[cno])
VAR RelatedCnos = CALCULATETABLE(VALUES(Customer[cno]), Customer[Citycode] = RelatedCity)
RETURN
CALCULATE(
SUM(Sales[ordval]),
ALL(Sales),
Sales[cno] IN RelatedCnos
)