【问题标题】:Moving Average in PowerBIPowerBI 中的移动平均线
【发布时间】:2017-12-16 18:56:15
【问题描述】:

我有一个数据集,日常用户可以在其中回答论坛上的问题,无论答案是否有用。

所以我计算:

- a measure that calculate the total answer by yes: answerYes
- a measure that calculate the total answer (yes or no): answerTot
- a measure that calculate the ratio: answerPercYes= DIVIDE(answerYes,answerTot)

我需要计算 7 天日期维度 (answerDate) 的移动平均值。如何在 PowerBI 中完成此操作?

非常感谢!

【问题讨论】:

  • 你能提供一个示例数据集和预期结果吗?

标签: statistics powerbi dax


【解决方案1】:

你可以试试这样的:

movingAverage:=
    CALCULATE(
        [answerPercYes]
       ,DATESINPERIOD(
          'answerDate'[Date]
          ,max('answerDate'[Date])
          ,-7
          ,DAY
        )
     )

【讨论】:

    猜你喜欢
    • 2017-09-01
    • 2013-12-22
    • 2022-01-26
    • 2017-03-19
    • 2013-01-22
    • 1970-01-01
    • 2011-06-29
    • 2019-04-24
    • 2012-05-24
    相关资源
    最近更新 更多