Salesforce Certified Tableau Data Analyst Practice Questions

Salesforce Certified Tableau Data Analyst exam preparation

Salesforce Certified Tableau Data Analyst practice questions in English: 172 questions with explanations. The mock exam has 60 questions and 105 minutes.

Salesforce Certified Tableau Data Analyst free question 6 / 10 · Domain 2: Explore and Analyze Data

You create a string parameter, Metric, as a List. The value Sales has the display name Revenue, and the value Profit has the display name Income. You write CASE [Metric] WHEN 'Revenue' THEN SUM([Sales]) WHEN 'Income' THEN SUM([Profit]) END, but the result is Null whichever item you select in the control. What is the reason?

  1. A CASE without an ELSE cannot be compared with the value of a parameter
  2. The calculation compares against the Value of the list, not the Display As text
  3. The current value stays Null until you open the parameter control
  4. A string parameter cannot be used in CASE and has to be an integer
Show the answer and explanation

Answer: B

Why this is correct
Each row of a parameter List has a Value and a Display As entry. In the help page's example of switching measures, a note says the calculated field must reference the Value entry for a given row, and not the Display As value. This calculation compares with the display names Revenue and Income, so no WHEN matches, and with no ELSE the result is Null. The WHEN clauses should use the values Sales and Profit.

Why the other options are wrong
"A CASE without an ELSE cannot be compared with the value of a parameter" … ELSE only sets the default result when no WHEN matches. A CASE without ELSE still returns the matching result when a value matches.
"A string parameter cannot be used in CASE and has to be an integer" … The parameter in the measure-switching example is a string, and comparing a string parameter in CASE is fine.
"The current value stays Null until you open the parameter control" … A parameter always has a current value, which starts as its default, and the value you pick in the control reaches the calculation. The Null comes from the text being compared.

Key point
The display name is the text users see in the parameter control. It is fine for the text in the calculation to differ from the text on screen, but mixing them up means nothing matches. When you write one aggregate per measure, keep every WHEN consistent in whether it aggregates.

Go to the Salesforce Certified Tableau Data Analyst practice app (10 free questions; purchase unlocks all questions)

See the full practice set