我有这个 DAX 指标
Average Weeks in Warehouse =
CALCULATE(
sum('Stock-Dwellings combined'[PalletWeeksTOTAL]) /
sum('Stock-Dwellings combined'[FullPalletsQty])
)
在表 Stock=Dwellings 组合中,我有字段 CustomerCode,我想将其用作切片器。
如何制定措施仅针对特定的 CutomerCode 字段而不是整个数据集?
尝试以下方法:
Average Weeks in Warehouse for Specific Customer =
CALCULATE(
sum('Stock-Dwellings combined'[PalletWeeksTOTAL]) /
sum('Stock-Dwellings combined'[FullPalletsQty]),
FILTER(
'Stock-Dwellings combined',
'Stock-Dwellings combined'[CustomerCode] = "yourCustomerCode" // here you specify the customer code to use as a filter
)
)