DAX Time Intelligence Functions Essentials Quiz Quiz

Enhance your understanding of DAX time intelligence functions with this focused quiz. Learn to identify key functions and their applications in calculating dates, periods, and time-based metrics.

  1. Identifying Year-To-Date Function

    Which DAX function is specifically designed to calculate the running total of a value from the beginning of the year to the current date?

    1. STARTOFYEAR
    2. DATESBETWEEN
    3. DATEADD
    4. TOTALYTD

    Explanation: The TOTALYTD function is used to compute the cumulative value since the start of the year up to a specified date. DATESBETWEEN returns a table of dates between two specified dates and does not perform aggregation itself. STARTOFYEAR only provides the first date of a year based on a date column, not any totals. DATEADD shifts dates forward or backward but does not provide year-to-date totals.

  2. Identifying Month-To-Date Calculation

    Which DAX function calculates the cumulative total of a value starting from the first day of a month to a given date within that month?

    1. PARALLELPERIOD
    2. TOTALMTD
    3. DATESINPERIOD
    4. ENDOFMONTH

    Explanation: TOTALMTD computes the running total from the start of a month to a specific date. DATESINPERIOD returns a set of dates rather than a total. PARALLELPERIOD shifts dates by a given period but does not sum values. ENDOFMONTH finds the last date in a month, not the cumulative total.

  3. Detecting Quarter-To-Date Calculations

    If you need to sum values from the beginning of the current quarter up to today, which function should you use?

    1. TOTALQTD
    2. QUARTER
    3. EARLIER
    4. NEXTQUARTER

    Explanation: TOTALQTD provides the running total for a quarter up to a specific date, making it the correct choice. NEXTQUARTER returns dates in the subsequent quarter but doesn't sum values. QUARTER is not a valid DAX time intelligence function, and EARLIER is used in row contexts, unrelated to time period calculations.

  4. Recognizing Previous Period Functionality

    To get the value that occurred in the month before the selected date, which DAX function should be used?

    1. SAMEPERIODLASTYEAR
    2. PREVIOUSMONTH
    3. NEXTMONTH
    4. PREVIOUSYEAR

    Explanation: PREVIOUSMONTH returns a table of dates from the month immediately preceding the current selection. SAMEPERIODLASTYEAR returns a parallel period from the previous year, not month. NEXTMONTH gives dates from the upcoming month. PREVIOUSYEAR focuses on last year's period instead of the previous month.

  5. Understanding Date Shifting Functions

    Which function shifts a set of dates backward or forward by a specified interval, such as moving data three months ahead?

    1. CALENDAR
    2. DATEADD
    3. DATESYTD
    4. FIRSTDATE

    Explanation: DATEADD adjusts dates by a given interval, making it ideal for moving data forward or backward in time. FIRSTDATE returns just the earliest date, not a shifted range. CALENDAR creates a list of sequential dates between two values. DATESYTD lists year-to-date dates but does not shift them.

  6. Retrieving the First Date of a Time Period

    Which DAX function should you use to find the earliest date in a column for the current year context?

    1. STARTOFMONTH
    2. ENDOFYEAR
    3. STARTOFYEAR
    4. LASTDATE

    Explanation: STARTOFYEAR gives the first date in the current year context from a date column. LASTDATE returns the most recent date, not the first. STARTOFMONTH finds the first date of the current month. ENDOFYEAR provides the last date of the year rather than the first.

  7. Selecting DAX Calendar Functions

    Which function generates a single-column table of dates between two specified dates?

    1. WEEKNUM
    2. CALENDAR
    3. TODAY
    4. NOW

    Explanation: CALENDAR generates a contiguous range of dates between the given start and end dates. TODAY returns the current date as a single value, not a table. WEEKNUM finds the week number for a date. NOW gives the current date and time, also not a date table.

  8. Calculating Time in Parallel Periods

    If you need to compare sales from the same quarter last year to the current quarter, which function helps retrieve the matching period a year earlier?

    1. NEXTYEAR
    2. SAMEPERIODLASTYEAR
    3. PREVIOUSMONTH
    4. DATEVALUE

    Explanation: SAMEPERIODLASTYEAR returns a table of dates from the matching period one year earlier. PREVIOUSMONTH brings in dates from the previous month, not the same period last year. DATEVALUE converts strings to dates, not periods. NEXTYEAR focuses on future dates, not past parallel periods.

  9. Using Cumulative Period Functions

    Which function returns the dates from the current selection up to the current date within a year for cumulative calculations?

    1. DATESINPERIOD
    2. LASTDATE
    3. DATESMTD
    4. DATESYTD

    Explanation: DATESYTD gives all dates from the start of the year up to the current date within that context, aiding in cumulative metrics. DATESINPERIOD returns a custom range but isn't tailored for year-to-date. LASTDATE finds only the last date. DATESMTD is specifically for month-to-date, not year.

  10. Working with Rolling Date Ranges

    Which DAX function helps produce a table of dates within a specified number of days, months, or years before or after a given date?

    1. PREVIOUSQUARTER
    2. CALENDARAUTO
    3. DATESINPERIOD
    4. EDATE

    Explanation: DATESINPERIOD constructs a table of dates for a dynamic period before or after a starting date, which is useful for rolling metrics. EDATE calculates a date offset by a certain number of months but doesn't build a table of dates. CALENDARAUTO auto-generates date tables for the model, not custom periods. PREVIOUSQUARTER returns dates from the last quarter, not a rolling period based on a specified length.