我有这个 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(
DIVIDE(
SUM('Stock-Dwellings combined'[PalletWeeksTOTAL]),
SUM('Stock-Dwellings combined'[FullPalletsQty]),
BLANK()
),
FILTER(
'Stock-Dwellings combined',
'Stock-Dwellings combined'[CustomerCode] = "yourCustomerCode"
)
)