我有一个衡量以前记录销售量的指标现在我想计算期间销售额与上一期销售额之间的差异,我尝试了简单的减法但我得到错误消息.. 有什么建议请.. 谢谢
Sales Change:= sales[sales]-Previous Day Sales
Previous Day Sales :=
CALCULATE (
SUM ( Sales[Sales] ),
FILTER (
ALL ( Sales ),
Sales[Date]
= CALCULATE (
MAX ( Sales[Date] ),
FILTER (
ALL ( Sales ),
COUNTROWS ( FILTER ( Sales, EARLIER ( Sales[Date] ) < Sales[Date] ) )
)
)
)
)