Analytics-DA-201 - Explore and Analyze Data - Section 2.1

Write date, string, logical and Boolean, number, type-conversion, aggregate, and basic spatial calculations.

Practice question for this objective

Free sampleExplore and Analyze Datamedium

A subscriptions dataset has an [Order Date] field stored as a date. Finance wants a calculated field [Renewal Due] that returns the date exactly three months after each order, so a contract placed on 10 April returns 10 July. Which calculation returns the correct renewal date?

Option A: DATEADD('month', 3, [Order Date])
Option B: DATEDIFF('month', [Order Date], 3)
Option C: DATEADD('day', 3, [Order Date])
Option D: DATEADD('quarter', 3, [Order Date])
  • ADATEADD('month', 3, [Order Date]) Correct
  • BDATEDIFF('month', [Order Date], 3)
  • CDATEADD('day', 3, [Order Date])
  • DDATEADD('quarter', 3, [Order Date])
Use DATEADD with the correct date_part and increment to shift a date forward by a fixed calendar interval. DATEADD(date_part, increment, date) returns a new date offset by the increment of the named part, so 'month' with 3 produces a date three calendar months after the source date rather than a count of days or intervals.

Why A is correct: DATEADD shifts a date by an interval; with the date_part 'month' and an increment of 3 it returns the date three calendar months later, so 10 April becomes 10 July.

Why B is wrong: This is tempting because it also names 'month', but DATEDIFF measures the number of intervals between two dates and returns an integer, not a date, and 3 is not even a valid date argument.

Why C is wrong: DATEADD is the right function, but the date_part 'day' advances the order by only three days rather than the three calendar months the renewal rule requires.

Why D is wrong: DATEADD is the right function, but 'quarter' with an increment of 3 advances the date by nine months rather than the three months required.

See more Analytics-DA-201 practice questions, answers explained.

More in this domain

Back to all Explore and Analyze Data objectives, or the Analytics-DA-201 cert hub.

Examworthy is not affiliated with or endorsed by Tableau. Original, blueprint-aligned practice material only.