Tableau TDA-C01 Practice Test Questions and Exam Dumps Part15 Q281-300

View Full Tableau TDA-C01 Exam Dumps and Practice Test Dumps

 

Question 281.

An analyst wants to create a calculated field that returns High, Medium, or Low based on different Sales thresholds. Which Tableau structure is most appropriate?

  1. IF / ELSEIF / ELSE
    2. COUNTD()
    3. ATTR()
    4. INDEX()

Correct Answer: 1

Explanation:

IF / ELSEIF / ELSE logic is ideal when a calculation needs to evaluate several conditions in sequence and return different outputs. For example, an analyst can classify Sales above one threshold as High, values above a second threshold as Medium, and all remaining values as Low. COUNTD() calculates distinct counts, ATTR() checks whether one consistent value represents a mark, and INDEX() returns the position of a mark within a partition. Threshold-based business classifications are a common use of conditional calculated fields in Tableau because they convert continuous measures into understandable categorical labels.

Question 282.

Which Tableau function is most appropriate when the analyst wants to compare one field against several exact values and return a different result for each match?

  1. SUM()
    2. CASE
    3. WINDOW_SUM()
    4. ZN()

Correct Answer: 2

Explanation:

CASE is useful when one expression needs to be compared against several exact values. For example, the analyst can check whether Region equals East, West, Central, or South and return a corresponding business label. CASE is often cleaner than multiple nested IF statements when the conditions are simple equality checks. SUM performs aggregation, WINDOW_SUM is a table calculation, and ZN replaces null numeric values with zero. For value-to-label mapping based on several exact matches, CASE is usually the most readable and maintainable approach.

Question 283.

An analyst wants to calculate Profit Margin as total Profit divided by total Sales. Which expression is most appropriate?

  1. [Profit] / [Sales]
    2. AVG([Profit]) / COUNT([Sales])
    3. SUM([Profit]) / SUM([Sales])
    4. COUNTD([Profit]) / SUM([Sales])

Correct Answer: 3

Explanation:

SUM([Profit]) / SUM([Sales]) calculates the ratio of total Profit to total Sales at the level of detail defined by the visualization. This is usually the intended method for an overall profit margin. A row-level expression such as [Profit] / [Sales] calculates a separate ratio for each record, and then Tableau may aggregate those ratios, which can produce a different result. AVG and COUNT-based expressions answer different analytical questions. Understanding the difference between row-level calculations and aggregate calculations is essential for creating accurate ratios in Tableau.

Question 284.

An analyst wants to prevent division by zero when calculating Profit Margin. Which calculation is most appropriate?

  1. SUM([Profit]) / SUM([Sales]) without a condition
    2. COUNT([Sales]) / SUM([Profit])
    3. ZN(SUM([Profit])) / SUM([Sales])
    4. IF SUM([Sales]) <> 0 THEN SUM([Profit]) / SUM([Sales]) END

Correct Answer: 4

Explanation:

The IF statement checks that the denominator is not zero before performing the division. If SUM(Sales) equals zero, the calculation returns null because no ELSE value is specified. This avoids an invalid ratio and makes the logic explicit. ZN is useful for replacing null numeric values with zero, but converting Sales to zero would not prevent a division-by-zero problem. COUNT-based logic answers a different question. When a calculation contains a denominator that may legitimately equal zero, explicitly testing that denominator is a good way to make the calculation robust.

Question 285.

Which Tableau function returns zero when a numeric expression is null?

  1. ZN()
    2. ISNULL()
    3. IFNULL() only
    4. COUNT()

Correct Answer: 1

Explanation:

ZN() is specifically designed for numeric null handling. If the supplied numeric expression is null, ZN returns zero; otherwise, it returns the original value. This is useful when missing numeric values should logically behave as zero in a calculation or display. ISNULL() only tests whether an expression is null and returns TRUE or FALSE. IFNULL() can also replace nulls with another compatible value, but ZN is the most direct function when the desired replacement is specifically numeric zero. Analysts should use it carefully because null and zero can have different business meanings.

Question 286.

Which Tableau function returns a replacement value when the original expression is null?

  1. ISNULL()
    2. IFNULL()
    3. COUNTD()
    4. ATTR()

Correct Answer: 2

Explanation:

IFNULL(expression, replacement) returns the original expression when it contains a value and returns the specified replacement when it is null. This can be used with compatible strings, numbers, dates, and other data types. For example, IFNULL([Region],”Unknown”) can provide a readable label for missing Region values. ISNULL() only tests for nulls, while COUNTD counts unique values and ATTR evaluates whether one common value represents the underlying data. IFNULL is therefore the appropriate function when the analyst wants to substitute a specific fallback value for missing data.

Question 287.

Which Tableau function should be used to test whether a field is null and return TRUE or FALSE?

  1. IFNULL()
    2. ZN()
    3. ISNULL()
    4. ATTR()

Correct Answer: 3

Explanation:

ISNULL() tests whether an expression contains a null value and returns a Boolean result. It is commonly used inside IF statements when different logic should be applied depending on whether data is missing. For example, an analyst might label records as Complete or Missing based on whether a required field is null. IFNULL replaces a null with another value, while ZN replaces numeric nulls specifically with zero. ATTR is an aggregation that returns a value when all underlying records agree. For a direct true-or-false null test, ISNULL is the correct function.

Question 288.

Which Tableau function returns the current date without including a time-of-day value?

  1. NOW()
    2. DATE()
    3. DATEADD()
    4. TODAY()

Correct Answer: 4

Explanation:

TODAY() returns the current date and is appropriate for calculations that operate at a calendar-day level. It can be used to calculate customer age, days since an order, days overdue, or remaining days before a deadline. NOW() returns the current date and time, making it better when hour, minute, or second precision is required. DATE() converts a compatible value into a date, while DATEADD shifts a date by a specified interval. For logic that only requires the current calendar date, TODAY is the correct choice.

Question 289.

An analyst wants to calculate the number of years between an Employee Start Date and today. Which Tableau calculation is most appropriate?

  1. DATEDIFF(‘year’,[Start Date],TODAY())
    2. DATEADD(‘year’,[Start Date],TODAY())
    3. YEAR([Start Date]) + TODAY()
    4. DATETRUNC(‘year’,[Start Date])

Correct Answer: 1

Explanation:

DATEDIFF() calculates the difference between two dates in a specified unit. Using ‘year’ as the date part returns the number of year boundaries between Start Date and today. This can provide an approximate tenure measure. Analysts should remember that DATEDIFF counts date-part boundaries rather than necessarily calculating a fully completed anniversary-based age. DATEADD shifts a date, YEAR extracts only the year component, and DATETRUNC rounds a date to the beginning of a year. For basic year-difference calculations, DATEDIFF is the most appropriate function.

Question 290.

Which Tableau function should be used to add 14 days to Ship Date?

  1. DATEDIFF()
    2. DATEADD(‘day’,14,[Ship Date])
    3. DATETRUNC()
    4. DATEPART()

Correct Answer: 2

Explanation:

DATEADD() adds or subtracts a specified number of date units from a date. DATEADD(‘day’,14,[Ship Date]) returns a new date 14 days after the original Ship Date. Negative values can be used when the analyst needs to move backward in time. DATEDIFF measures the distance between dates, DATETRUNC reduces a date to a time boundary, and DATEPART extracts a component. DATEADD is therefore the appropriate function for creating deadlines, renewal dates, projected completion dates, and other shifted-date calculations.

Question 291.

Which Tableau function returns the beginning of the quarter containing a date?

  1. QUARTER()
    2. DATEPART()
    3. DATETRUNC(‘quarter’,[Date])
    4. DATEDIFF()

Correct Answer: 3

Explanation:

DATETRUNC(‘quarter’,[Date]) returns the date corresponding to the beginning of the quarter that contains the original date. This retains a true date value and is useful for consistent quarterly grouping, comparisons, and relationships. A quarter date part may return only the quarter number, depending on the function used, while DATEPART extracts a selected date component. DATEDIFF measures elapsed intervals. DATETRUNC is particularly useful when the analyst wants all dates within the same quarter to share one period-start date.

Question 292.

Which Tableau function returns the current date and time?

  1. TODAY()
    2. DATE()
    3. MAKEDATE()
    4. NOW()

Correct Answer: 4

Explanation:

NOW() returns the current date and time. This is useful for calculations where time-of-day precision matters, such as determining how many hours have passed since an event or whether a process exceeded a minute-based threshold. TODAY() returns only the current date. DATE() converts a compatible expression to a date, while MAKEDATE constructs a date from year, month, and day components. Analysts should choose NOW when the time portion matters and TODAY when only the calendar date is relevant to the business question.

Question 293.

An analyst has a Product Code field and wants to extract the final four characters. Which function should be used?

  1. RIGHT()
    2. LEFT()
    3. MID()
    4. FIND()

Correct Answer: 1

Explanation:

RIGHT(string, number) returns a specified number of characters from the end of a string. For example, RIGHT([Product Code],4) returns the last four characters. This is useful when standardized identifiers contain meaningful suffixes such as model numbers, market codes, or version information. LEFT extracts from the beginning, MID extracts from an internal position, and FIND returns the position where a substring appears. When the required characters are located at the end of a text field, RIGHT is the most direct Tableau function.

Question 294.

Which Tableau function should be used to extract five characters beginning at the third position of a string?

  1. RIGHT()
    2. MID()
    3. LEFT()
    4. LEN()

Correct Answer: 2

Explanation:

MID() returns a portion of a string beginning at a specified position and for a specified number of characters. This is appropriate when the desired text is located inside a structured identifier rather than at the beginning or end. For example, MID([Code],3,5) extracts five characters beginning at the third position. LEFT and RIGHT operate from the ends of a string, while LEN returns the total number of characters. MID is therefore the appropriate choice for extracting a fixed-length substring from a known internal position.

Question 295.

Which Tableau function returns the number of characters in a text value?

  1. FIND()
    2. RIGHT()
    3. LEN()
    4. CONTAINS()

Correct Answer: 3

Explanation:

LEN() returns the total number of characters in a string. This can be useful for data validation, classifying codes by length, checking whether identifiers conform to expected formats, or supporting other string-parsing logic. FIND returns the position of a substring, RIGHT extracts trailing characters, and CONTAINS tests whether a substring exists. LEN does not modify the original text; it simply produces a numeric count. It is one of Tableau’s standard string functions for analyzing and cleaning textual data.

Question 296.

Which Tableau function should an analyst use to replace a known substring inside a text field?

  1. TRIM()
    2. FIND()
    3. LEFT()
    4. REPLACE()

Correct Answer: 4

Explanation:

REPLACE() substitutes a specified substring with another substring. For example, an analyst can standardize product descriptions by replacing an abbreviation with a full word. The transformation affects the calculated result inside Tableau and does not permanently alter the underlying source data. TRIM removes surrounding whitespace, FIND returns the position of a substring, and LEFT extracts characters from the beginning. REPLACE is therefore appropriate when a known piece of text needs to be systematically substituted with another value.

Question 297.

An analyst has yearly tables with identical column structures and wants to combine all rows into one dataset. Which Tableau operation is most appropriate?

  1. Union
    2. Join
    3. Relationship
    4. Data blend

Correct Answer: 1

Explanation:

A union stacks rows from multiple tables with the same or compatible column structures. If each yearly table contains the same fields, a union can combine all years into one longer dataset. This is common when data is partitioned by month, quarter, or year. A join combines columns according to matching keys, while relationships connect logical tables without immediately flattening them. Data blending works with aggregated data across separate sources. When records from similar tables should be appended vertically, a union is the correct operation.

Question 298.

Which join type preserves every row from the right table and only matching rows from the left table?

  1. Inner join
    2. Right join
    3. Left join
    4. Full outer join

Correct Answer: 2

Explanation:

A right join retains every row from the right table. Where matching keys exist in the left table, the corresponding left-side fields are added. When no match exists, the left-side fields are null. This is the opposite of a left join, which preserves all rows from the left table. An inner join keeps only matching rows, while a full outer join retains unmatched records from both sides. Analysts should choose the join type based on which population must be preserved and should also check join cardinality to avoid unintended row multiplication.

Question 299.

A Tableau workbook combines an Orders table at order-line level with a Targets table at salesperson-month level. Which modeling technique is often preferable to a physical join when the goal is to preserve each table’s grain?

  1. Union
    2. Bin
    3. Relationship
    4. Parameter

Correct Answer: 3

Explanation:

Relationships allow logical tables to remain at their own natural levels of detail until Tableau determines how they need to be queried for a particular visualization. This is valuable when Orders and Targets are stored at different grains because a physical join can duplicate target values across many order rows. Relationships can reduce this type of unwanted row multiplication while still allowing fields from both tables to participate in analysis. A union stacks rows, while bins and parameters do not address data modeling. Correctly defined relationships are therefore often preferable for multi-table models with different levels of detail.

Question 300.

A dashboard user should be able to click a bar in one worksheet and have several target worksheets show only matching data. Which Tableau feature should be configured?

  1. Highlight action
    2. Parameter action
    3. URL action
    4. Filter action

Correct Answer: 4

Explanation:

A filter action passes values from selected marks in a source worksheet to one or more target worksheets and restricts those target views accordingly. For example, clicking a Product Category bar can cause several charts and tables to display only data associated with that category. Highlight actions keep unrelated marks visible, parameter actions update parameter values, and URL actions open external resources. When the requirement is to remove nonmatching data from multiple target views based on an interactive selection, a filter action is the most direct and appropriate Tableau dashboard feature.