获得正确的总dax功率bi的正确总和

发布于 2025-02-07 18:45:19 字数 760 浏览 1 评论 0原文

我有: 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:

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2025-02-14 18:45:19

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".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文