DAX量度Power BI的平均值

时间:2018-11-30 12:43:02

标签: powerbi average dax measure

我有一个Power BI数据模型,其中包含用于测量进出建筑物的人员的传感器数据。每次触发传感器时,都会创建一个新行,其中包含有多少人进入,有多少人离开以及日期和时间。我的事实表连接到单独的日期表(日期级别)和时间表(分钟级别)。

我想在数据上创建一些汇总,以了解一段时间内建筑物中的最小,最大,平均人数,因此我创建了一个度量给我Cumulative_in_Building:

Cumulative_in_Building = 

calculate(
    sum(FootfallTestData[Net Movement]), 
    filter(
        ALL(Dato[Dato]), 
        Dato[Dato]<=Max(Dato[Dato])),
       filter(
        ALL('Time'[TimePresis]), 
        'Time'[TimePresis]<=Max('Time'[TimePresis])) )

问题是因为我无法在度量(仅列)上使用聚合。我该如何解决?

enter image description here

0 个答案:

没有答案
相关问题