Menu
CoddyTech

最近 7 天

本课属于 Coddy Power BI 学习旅程的“时间智能”单元。第 15 课,共 17 课。

DATESINPERIOD(Dates[Date], end, -7, DAY):以某一天为结束日期的 7 天。

Last 7 Days = CALCULATE([Revenue], DATESINPERIOD(Dates[Date], MAX(Dates[Date]), -7, DAY))

1 月 10 日涵盖 1 月 4 日至 10 日。这个窗口会随行移动,并让曲线更平滑。

challenge icon

挑战

中等

编写 Last 7 Days:统计截至每一行对应日期的 7 天内的收入。我们会按天检查 2025 年 1 月的数据。

亲手试试

Last 7 Days =
DateLast 7 Days
[object Object]
总计
字段
  • Sales
    • Revenue
    • Total Units
    • Customers
  • Products
  • Stores
  • Customers
  • Dates
    • Date
    • Year
    • Quarter
    • Month
    • MonthNumber
    • Weekday
  • Targets

时间智能中的所有课