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
When did each shop make its first sale? Write First Sale: the earliest date in Sales[Date]. It is checked for each store.
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Time Intelligence
1Dates and Calendars
The Date TableCounting DaysWeekdays and WeekendsFirst and Last DatesRecap - Revenue per Day