获得正确的总dax功率bi的正确总和
我有: DIM表: 帐户:客户粒度水平。
事实表: 电话。打电话给客户粒度级别。
我需要创建并查看对客户的电话数量,直到客户首次存款为止。
我能够在客户级别上执行此操作,但是在总级别上,我得到了一个奇怪的结果:
我的度量:
ACC_Calls_2_FDP =
CALCULATE(
COUNTROWS(PhoneCalls),
PhoneCalls[disposition] = "ANSWERED", -- only calls that were answered
PhoneCalls[calldate] <= MAX(Accounts[FDP_Date]), -- up until FDP date per customer
USERELATIONSHIP(Accounts[AccountNo],PhoneCalls[AccountNo]) -- make the connection active
)
结果是:
在我期望看到的14中。 > 536 到底是怎么回事?我想念什么?
数据模型: 过滤器方向:帐户过滤器phonecalls 基数1:*
I have:
Dim Table:
Accounts: customer granularity level.
Fact Table:
PhoneCalls. calls to customers granularity level.
I need to create and see the number of calls made to a customer up until the customer made their first deposit.
I was able to do this on the customer level but on the Total level I get a weird result:
my measure:
ACC_Calls_2_FDP =
CALCULATE(
COUNTROWS(PhoneCalls),
PhoneCalls[disposition] = "ANSWERED", -- only calls that were answered
PhoneCalls[calldate] <= MAX(Accounts[FDP_Date]), -- up until FDP date per customer
USERELATIONSHIP(Accounts[AccountNo],PhoneCalls[AccountNo]) -- make the connection active
)
the results are:
On the total level i was expecting to see 14. not 536
what is going on? what am i missing?
The data model:
Filter direction: Accounts filters PhoneCalls
Cardinality 1:*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Power BI不会像Excel中的每个行值总和。相反,对于宏伟的总价值,他们仍将将其计算为一排本身,而ancountno上没有过滤器。
在这种情况下,在整个表中摄入FDP_DATE的最大值。因此,例如,ACC 1的最大日期为3,ACC 3的最大值为10。总计计算将使用10作为最大值,并在使用FDP_DATE&lt的哪一行上启动乡村; 10。
解决这个问题很棘手,因为除此之外,我没有其他信息。但是,我希望这可以很好地解释“错误”。
Power BI doesn't sum up each of the row values as in Excel. Instead, for Grand total value they will still calculate it as a row itself with no filters on AccountNo on it.
In this case, the max value of FDP_Date in the whole table is taken in the measure. So for example, ACC 1 has max date of 3, ACC 3 has the max of 10. The grand total calculation will use 10 as the max value and start countrows on whichever rows with FDP_Date < 10.
To fix this is tricky as I don't have any other information than this. However, I hope this explains you well of the "bug".