

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 2
click for more info
Not enough gems
Cost: 6 gems
1: DAX
incomplete
2: Logical Functions – IF
incomplete
3: SWITCH Function
incomplete
4: Time Intelligence Functions
incomplete
5: More Time Functions
incomplete
6: Add Columns
incomplete
7: Aggregations
incomplete
8: Aggregations As Measures
incomplete
9: Iterators
incomplete
10: Calculated Columns vs. Measures
incomplete
11: Context in DAX
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Time functions in DAX help you analyze how values change over time by using your Date table to understand the order of days, months, and years. Two of my favorites are:
The TOTALMTD function calculates the total of a measure from the start of the current month up to the current date. Here's an example that calculates the number of new customers acquired in the current month up to today.
MTD New Customers =
TOTALMTD(
[New Customers],
dates[date_date]
)
The PREVIOUSMONTH function shifts the date context back one full month and calculates the measure for that previous month. Here's an example that calculates the number of new customers acquired in the previous month:
Previous Month New Customers =
CALCULATE(
[New Customers],
PREVIOUSMONTH(dates[date_date])
)
I've used these functions for years, and you'll see them used in a lot of dashboards! Now, because our data for this course is a snapshot from the past, we won't use these now, but when you have "live" data they're very useful.