Menu
CoddyTech

The Last 7 Days

Part of the Time Intelligence section of Coddy's Power BI journey. Lesson 15 of 17.

DATESINPERIOD(Dates[Date], end, -7, DAY): seven days ending on a day.

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

10 January covers 4 to 10 January. The window moves with the rows and smooths the line.

challenge icon

Challenge

Medium

Write Last 7 Days: Revenue over the 7 days ending on each row's day. It is checked day by day for January 2025.

Try it yourself

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

All lessons in Time Intelligence