[英]Power pivot running total issue
Not sure if anyone can help me with a DAX issue I'm having. 不知道是否有人可以帮助我解决DAX问题。 I've followed the advice on this blog ( http://javierguillen.wordpress.com/2012/11/28/running-total-techniques-in-dax/ ).
我已遵循此博客( http://javierguillen.wordpress.com/2012/11/28/running-total-techniques-in-dax/ )上的建议。 My measures are in the same format as this:
我的度量格式与此相同:
CALCULATE( SUM( FactSales[SalesAmount] ),
FILTER(
ALL( DimDate) ,
DimDate[Datekey] <= MAX( DimDate[Datekey] )
)
)
I have two measures: a running target and running actuals. 我有两个度量:一个运行目标和一个运行实际值。 I want the actuals line to stop at the current date rather than flat lining from current date to the end of the year.
我希望实际行在当前日期停止,而不是从当前日期到年底结束。
Does anyone know how I can achieve this? 有谁知道我怎么能做到这一点?
Thanks for your help in advance. 感谢您的帮助。
Tom 汤姆
Following correction would solve your problem. 进行更正可以解决您的问题。 Replace first parameter to Calculate
替换第一个参数进行计算
From "SUM( FactSales[SalesAmount]" 来自“ SUM(FactSales [SalesAmount]”
with "IF( MAX(DimDate[DateKey]) > TODAY(),Blank(),SUM( FactSales[SalesAmount])" . 与“ IF(MAX(DimDate [DateKey])> TODAY(),Blank(),SUM(FactSales [SalesAmount])”一起使用 。
=CALCULATE( IF( MAX(DimDate[DateKey]) > TODAY(),Blank(),SUM( FactSales[SalesAmount]),
FILTER(
ALL( DimDate) ,
DimDate[DateKey] <= Max( DimDate[DateKey] )
)
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.