nerdexam
CompTIA

DA0-001 · Question #9

A data analyst has been asked to derive a new variable labeled "Promotion_flag" based on the total quantity sold by each salesperson. Given the table below: Which of the following functions would…

The correct answer is C. Logical. A Logical function (such as IF/IIF) evaluates a condition and returns one value when true and another when false. Here, the logic is: IF Quantity_sold > 1,000,000 THEN 'Yes' ELSE 'No'. Date functions handle date/time calculations, Mathematical functions perform arithmetic…

Data Analysis

Question

A data analyst has been asked to derive a new variable labeled “Promotion_flag” based on the total quantity sold by each salesperson. Given the table below:

Which of the following functions would the analyst consider appropriate to flag “Yes” for every salesperson who has a number above 1,000,000 in the Quantity_sold column?

Exhibit

DA0-001 question #9 exhibit

Options

  • ADate
  • BMathematical
  • CLogical
  • DAggregate

How the community answered

(25 responses)
  • A
    12% (3)
  • B
    4% (1)
  • C
    76% (19)
  • D
    8% (2)

Explanation

A Logical function (such as IF/IIF) evaluates a condition and returns one value when true and another when false. Here, the logic is: IF Quantity_sold > 1,000,000 THEN 'Yes' ELSE 'No'. Date functions handle date/time calculations, Mathematical functions perform arithmetic operations, and Aggregate functions (SUM, COUNT, AVG) summarize multiple rows into a single value. None of those apply to a conditional flag based on a threshold - that is squarely the role of a logical/conditional function.

Topics

#Logical functions#Conditional logic#Data transformation#Deriving new variables

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice