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…
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
Options
- ADate
- BMathematical
- CLogical
- DAggregate
How the community answered
(25 responses)- A12% (3)
- B4% (1)
- C76% (19)
- D8% (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
Community Discussion
No community discussion yet for this question.
