TECHNOLOGIESTieInn Technologies

Time intelligence

Power BI · 12 questions

Short notes

Key idea

Time intelligence functions compare periods: year to date, the same period last year, growth. They need a proper date table: one row per day, no gaps, marked as the date table.

Syntax

Revenue YTD = TOTALYTD([Revenue], 'Date'[Date])
Revenue LY  = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Date'[Date]))
YoY %       = DIVIDE([Revenue] - [Revenue LY], [Revenue LY])
Revenue MTD = TOTALMTD([Revenue], 'Date'[Date])
Last 3M     = CALCULATE([Revenue], DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -3, MONTH))

Example

A line chart by Date[Month] with Revenue and Revenue LY shows this year against last year month by month. YoY % as a card shows the growth for whatever period is selected.

Traps

  • No date table, or gaps in it, and the functions return wrong or blank results.
  • Use the date table's column, not the date column of the fact table.
  • Financial year: pass the year-end, e.g. TOTALYTD([Revenue], 'Date'[Date], "31/3") for an April–March year.
  • The current month is partial; comparing it with a full month last year looks like a drop.

Want the full lesson with step-by-step examples, a project and a certificate? Power BI course, ₹120 →

Questions

5 free questions
5 questions

    Time intelligence

  1. Question 1easy

    What does DAX time intelligence need in the model?

  2. Time intelligence

  3. Question 2medium

    Which measure shows revenue for the same period last year?

  4. Time intelligence

  5. Question 3medium

    Your company's year runs April to March. How do you get fiscal year-to-date revenue?

  6. Time intelligence

  7. Question 4easy

    Months in your chart show Apr, Aug, Dec, Feb... How do you fix the order?

  8. Time intelligence

  9. Question 5hard

    How is an all-time running total different from TOTALYTD?

7 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.