Locked lesson.
About this lesson
This lesson will explore a couple of key Date/Time Intelligence measures that allow us to return Month-To-Date and Year-To-Date versions of our measures that change with the date selections made by our users.
Exercise files
Download this lesson’s related exercise files.
Time Intelligence Measures.xlsx877.7 KB Time Intelligence Measures - Completed.xlsx
893 KB
Quick reference
Time Intelligence Measures
Working with Time Intelligence in Power Pivot.
When to use
When you want to return MTD, QTD or YTD values based on a selection.
Instructions
Creating basic time intelligence measures:
Best Practices
- Ensure that you have Calendar Table with a column of contiguous dates (one entry per day with no gaps)
- Always point your time intelligence against the Calendar table for dates, NEVER your Fact table’s date column
Using Time Intelligence Functions
- MTD
- =TOTALMTD([Measure],'Calendar'[Date])
- QTD
- =TOTALMTD([Measure],'Calendar'[Date])
- Works for years that end Mar 31, Jun 30, Sep 30 or Dec 31
- YTD for 12 month year ends that end Dec 31 of each year
- =TOTALYTD([Measure],'Calendar'[Date])
- YTD for 12 month year ends that do NOT end Dec 31 of each year
- =TOTALYTD([Measure],'Calendar'[Date], 'Calendar'[Date],"Mar 31")
- Replace “Mar 31” with your year end
- Note that the 'Calendar'[Date] portion must be declared twice
Hints & tips
- In order for these functions to work correctly, you MUST base them on a table[column] that contains a contiguous list of dates with no gaps (your Calendar table)
- NEVER target these functions against a Fact table, as there may be gaps (power outages, closure days) which leaves gaps in the dates causing the functions to calculate incorrectly
- Other calendars can be provided to Power Pivot including 13 fiscal period, 445 calendars and their variants, but they are outside the scope of this course
Lesson notes are only available for subscribers.