Menu
CoddyTech

First and Last Dates

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

MIN and MAX of a date column: the earliest and the latest date.

First Sale = MIN(Sales[Date])

DATEDIFF(start, end, DAY) counts the days between two dates.

Days Since Last Visit = DATEDIFF(MAX(Sales[Date]), DATE(2025, 12, 31), DAY)
challenge icon

Challenge

Easy

When did each shop make its first sale? Write First Sale: the earliest date in Sales[Date]. It is checked for each store.

Try it yourself

First Sale =
StoreFirst Sale
Lisbon Riverside
Porto Ribeira
Madrid Centro
Barcelona Gracia
Berlin Mitte
Total
Fields
  • Sales
    • Revenue
    • Total Units
    • Customers
  • Products
  • Stores
    • StoreID
    • Store
    • City
    • Country
    • OpenDate
  • Customers
  • Dates
  • Targets
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Time Intelligence