Analytics-DA-201 - Explore and Analyze Data (41% of the exam) - Section 2.1
Write date, string, logical and Boolean, number, type-conversion, aggregate, and basic spatial calculations.
Practice question for this objective
lock_openFree 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?
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.
Answers that look right on this material and are not. Each one is a distractor from a different question in the Analytics-DA-201 bank for this domain.
FLOAT([Customer ID])
errorWhy it is wrong: FLOAT does convert the text to a number, but it yields a decimal type such as 482.0 rather than a true integer, so it does not match a requirement for an integer field.
SUM([Sales]) / SUM([Sales])
errorWhy it is wrong: Both numerator and denominator are the same category-level aggregate, so every row returns 1, or 100 percent, rather than a meaningful share of the whole.
{ FIXED [Category] : AVG([Sales]) }, then displayed directly on the row.
errorWhy it is wrong: This averages individual order-line sales per Category, not per-customer totals, so frequent buyers are still weighted by their number of rows.