Salesforce certification · Exam Salesforce-Tableau-Data-Analyst

Salesforce-Tableau-Data-Analyst Mock Exam Page 2

Salesforce Tableau Data Analyst

Free Salesforce-Tableau-Data-Analyst questions on Explore and Analyze Data, each with the answer and an explanation.

20 questions · 35 minutes · free, no sign-up

Explore and Analyze Data questions

11–20 of 23 free
Question 11 Choose 2
You want to add a comment to March 2020 as shown in the following visualization.
You have the following sets in a Tableau workbook:

➡️ Top N Customers
➡️ Customers of 2020
➡️ Top N Products
➡️ Sellers of 2020

Which two sets can you combine?
(Choose two)
Show answerHide answer

Correct answer: B, D Customers of 2020Top N Customers

Explanation

Explanation

To combine sets in Tableau, both sets must be built from the same dimension. This fundamental rule ensures logical compatibility when performing set operations like unions, intersections, or differences. Sets based on different dimensions (e.g., customers vs. products) cannot be combined because they represent fundamentally different data categories with no direct relationship.

✅ Correct Options

Option B: Customers of 2020
This set can combine with Top N Customers because both are derived from the Customer dimension. They share the same member type, allowing logical set operations like finding customers who belong to both groups or comparing their memberships.

Option D: Top N Customers
This set pairs perfectly with Customers of 2020 since they use the same customer dimension. You can create combined sets to analyze relationships between these customer groupings through intersection, union, or exclusion operations.

❌ Incorrect Options

Option A: Sellers of 2020
This set cannot combine with customer-based sets because it uses a Seller dimension. Dimensions must match for set combination, and sellers represent a completely different entity group than customers.

Option C: Top N Products
This product-based set is incompatible with customer sets. Tableau prevents combining sets from different dimensions like products and customers because they lack inherent relationships for meaningful set operations.

📝 Summary
Only sets from identical dimensions can combine. Customer-based sets work together, but cannot merge with product or seller sets due to dimensional mismatch.

🔗 Reference
Tableau Help: "Combine Sets"
Question 12 Choose 1
You have the following bar chart.

You want the chart to appear as shown in the Mowing exhibit.

What should you add?
Show answerHide answer

Correct answer: B A reference line

Explanation

Explanation

The goal is to add a single horizontal line that acts as a baseline or target across the entire visualization, allowing for easy comparison of each bar's value against that fixed point. A reference line in Tableau is precisely designed for this purpose: to mark a constant value, an average, a sum, or a calculated parameter value across the axis.

✅ Correct Option: B (A reference line)
A reference line draws a single line across the axis to indicate a specific, constant value (e.g., a target, budget, or previous year's maximum). It is a simple and effective way to instantly show if the bars (the data points) are above or below a key benchmark. This matches the required visualization, which shows one fixed horizontal line.

❌ Incorrect Option: A (A reference band)
A reference band shades an area between two values on the axis (e.g., Min and Max, or 80th and 100th percentile). It is used to highlight a range of acceptable or target values, which is different from showing a single, fixed benchmark line.

❌ Incorrect Option: C (An average line)
An average line is a specific type of reference line that is automatically calculated as the average of the measure currently in the view. While it results in a single line, if the desired line is a specific, pre-determined value (e.g., a fixed sales target of $10,000) and not the calculated average of the displayed data, then the more general Reference Line option is the correct choice to ensure flexibility and accuracy.

❌ Incorrect Option: D (A distribution band)
A distribution band shades the area of the distribution of values, such as the area within one or two standard deviations, or within a specific percentile range (e.g., the middle 60%). Similar to a reference band, it highlights a range (a band), not a single, fixed line.

🔗 Reference
Reference Lines, Bands, Distributions, and Boxes
Question 13 Choose 1
You have the following dataset.

You plan to create a dashboard that will be filtered to show only data that is relevant to a specific Tableau user based on the Tableau_User_Name field You need to create a boolean calculated field to place on the data source finer Which formula should you use for the filter?
Show answerHide answer

Correct answer: D USERNAME()=(Tableau_USER_NAME)

Explanation

Explanation

To filter a published dashboard so that each user only sees the data relevant to them (known as user-based filtering or row-level security), the analyst must create a Boolean calculated field that compares the currently logged-in user's name against a unique identifier field in the data. The Tableau function $\text{USERNAME()}$ returns the username of the user viewing the dashboard on Tableau Server/Cloud. Comparing this result directly to the Tableau_User_Name field will yield $\text{TRUE}$ only for the rows that belong to that user, correctly creating the necessary security filter.

✅ Correct Option: [D] USERNAME()=(Tableau_USER_NAME)
This formula is the standard and correct syntax for implementing row-level security based on usernames in Tableau. $\text{USERNAME()}$ returns the string of the authenticated user (e.g., kh@email.com). The formula evaluates to $\text{TRUE}$ when the logged-in user's username matches the value in the $\text{Tableau\_User\_Name}$ field for that specific row, allowing only those rows to pass the filter for the current viewer.

❌ Incorrect Option: [A] NAMEUSERNAME()
This syntax is invalid in Tableau. There is no standard function named $\text{NAMEUSERNAME()}$. The correct function to retrieve the logged-in user's ID is simply $\text{USERNAME()}$. Since this option is not a valid Tableau function, it would produce an error and cannot be used to filter the data source.

❌ Incorrect Option: [B] ISFULLNAMETableu_USER_NAME))=USERNAME()
This syntax is also invalid. There is a function called $\text{ISFULLNAME()}$ in Tableau, but it is a Boolean function used to test if a string matches the full name of the user, not a function that returns the full name. It is not designed to return a value to be compared against a data column, nor is it correctly structured for comparison.

❌ Incorrect Option: [C] NAME Tableau_USER_NAME)
This syntax is invalid. While $\text{NAME}$ is not a standalone function, the expression structure itself is incorrect for what is required. To establish a filter, an equality check (comparison) must be made between the user's login ID and the data field containing the corresponding login ID, which this option fails to do.

Reference 🔗
Tableau Help: Restrict Access to a Data Source on Tableau Server
Question 14 Choose 1
A Data Analyst needs to calculate the first Tuesday of each month in the data. Which set of functions should the analyst use to perform this calculation
Show answerHide answer

Correct answer: C DATETRUNC, DATEPART

Explanation

Explanation

To find the first Tuesday of each month, the standard and most reliable approach in Tableau is to:
Go to the first day of the month using DATETRUNC('month', [Date])
Determine what weekday that day is
Add the correct number of days using DATEADD to reach the first Tuesday
Only one option contains exactly the two functions needed for this logic.

Correct Option:

✅ A. DATETRUNC, DATEADD
This is the officially recommended combination.
Typical formula:
DATEADD('day', (3 + (7 - DATEPART('weekday', DATETRUNC('month', [Order Date]))) % 7 ) % 7 , DATETRUNC('month', [Order Date]) )
It first truncates to the 1st of the month, finds the weekday, calculates how many days to add, then adds them — always landing on the first Tuesday.

Incorrect Options:

❌ B. DATEADD, DATENAME
DATENAME returns text like “Tuesday” instead of a number, so you cannot perform arithmetic with it to add the correct number of days. It is useful for labels, but not for calculating the exact date of the first Tuesday.

❌ C. DATETRUNC, DATEPART
These two functions together can get you to the 1st of the month and tell you its weekday number, but they cannot add days — you remain stuck on the 1st and cannot reach the actual first Tuesday without DATEADD.

❌ D. DATEDIFF, DATEPART
DATEDIFF calculates the difference between two dates and DATEPART extracts parts, but neither can construct or return a new date that falls on the first Tuesday. This pair is completely insufficient for the required result.

Reference:
Tableau Official Functions Reference – DATETRUNC
Tableau Training Videos (2024+) – “First Tuesday of the Month” example uses exactly DATETRUNC + DATEADD
Question 15 Choose 1
In a dataset, a Data Analyst has a string field named Name that contains unnecessary semicolons.

Which function should the analyst use to remove the semicolons from the Name field?
Show answerHide answer

Correct answer: D REPLACE

Explanation

Explanation

Cleaning text fields is an important step in data preparation. When a field such as Name contains characters that do not add value, those characters should be removed without breaking the text into multiple pieces. Tableau provides functions that can test, locate, split, or substitute characters, but only one of these functions can directly replace unwanted symbols with blank values, ensuring the data remains clean and readable.

✔️ Correct Option: D. REPLACE
The REPLACE() function directly replaces selected characters with another value. By using REPLACE([Name], ";", ""), semicolons are completely removed from the text. This function is ideal for cleaning string data because it modifies the text while keeping the original field structure intact, without splitting or returning only a Boolean output.

❌ Incorrect Options

CONTAINS
This function checks whether a text string contains a particular value and returns TRUE or FALSE. Since it only identifies the presence of characters and does not modify the text, it cannot be used to remove or clean unwanted characters such as semicolons.

SPLIT
The SPLIT function divides text into separate segments based on a specified delimiter. Using SPLIT with semicolons would break the Name field into multiple fields, which is unnecessary and undesired when the goal is only to clean a string by removing characters.

FIND
FIND returns the position of a substring within a string. While it can help identify where an unwanted character appears, it does not alter or remove any characters. It is useful for locating text, not modifying or cleaning it.

📎 Reference
🔗 Tableau String Functions: “REPLACE(string, substring, replacement)” https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_string_functions.htm
Question 16 Choose 2
A Data Analyst has the following sets in a Tableau workbook:

Top N Customers
Customers of 2024
Top N Products
Sellers of 2024

Which two sets can the analyst combine? (Choose two.)
Show answerHide answer

Correct answer: B, C Top N CustomersCustomers of 2024

Explanation

Explanation

In Tableau, two or more sets can be combined (using operations like Union, Intersect, or Difference) only if they are derived from the same dimension. Combining sets from different dimensions (e.g., combining a Customer set with a Product set) is logically impossible, as the resulting set would contain incompatible member types. Therefore, the analyst must identify the sets based on the same underlying field.

✅ Correct Option: B
Top N Customers
This set is based on the Customer dimension. Because it shares the same base dimension with the Customers of 2024 set, it can be combined using Tableau's set combination features (e.g., to find customers who are both a Top N Customer and were a Customer of 2024).

✅ Correct Option: C
Customers of 2024
This set is also based on the Customer dimension. Since it is derived from the same dimension as the Top N Customers set, they can be successfully combined. The combination allows for advanced analysis, such as identifying the intersection (customers present in both sets) or the union (all unique customers from both sets).

❌ Incorrect Options

A. Sellers of 2024
This set is based on the Seller dimension (or employee dimension). This dimension is different from the Customer dimension used for options B and C, and the Product dimension used for option D. Therefore, it cannot be combined with the sets based on Customers or Products.

D. Top N Products
This set is based on the Product dimension. This dimension is different from the Customer dimension used for options B and C, and the Seller dimension used for option A. Consequently, it cannot be combined with the sets based on Customers or Sellers.

📖 Reference
Tableau Official Documentation: Combine Sets
Source: Tableau Help: Combine Sets (Search for "Tableau combine sets same dimension" on the official Tableau website)

Note: The official Tableau documentation clearly states that "You can only combine sets if they are based on the same dimension." This rule is fundamental to performing set operations in Tableau.
Question 17 Choose 1
You have a data source that contains data tor every city in the Unites States. The following is a sample of the data.
You need to use the City dimension to create a dynamic filter that snows the cities that have a population greater than one million.Which type of filter should you use?
Show answerHide answer

Correct answer: D Condition filter

Explanation

Explanation

The question asks for a dynamic filter using the City dimension to show only cities with populations greater than 1 million. Since the condition depends on a measure value, the correct approach is applying a rule-based filter that evaluates the population numerically, not by text or ranking.

🟩 Correct Option: Condition Filter
A Condition filter is used when you need to keep dimension members based on a numerical condition from a measure. For example, applying Population > 1000000 while filtering the City dimension ensures that only cities whose population exceeds one million are displayed. It also updates dynamically as population values change in the data.

❌ Incorrect Option: General Filter
A General filter only allows selecting dimension members manually from a list. It does not evaluate numeric rules, so you would have to manually choose each city. When population values change or more cities exceed one million, the filter wouldn’t update automatically.

❌ Incorrect Option: Wildcard Filter
A Wildcard filter is text-based. It filters values using patterns like letters or characters (e.g., cities starting with “S”). Because it cannot compare numbers or measures, it cannot filter based on population size, making it unsuitable for this task.

❌ Incorrect Option: Top Filter
A Top filter ranks dimension members based on a measure (e.g., Top 10 cities by population). It cannot filter based on a specific threshold like population > 1 million. It restricts results based on ranking, not on a numeric condition.

📝 Summary
To show only cities with populations above one million, a Condition filter must be used. It applies a numerical rule to the population measure, unlike general, wildcard, and top filters, which cannot evaluate numeric thresholds.

🔗 Reference
Official Tableau Filter Documentation:
Filter Data from Your Views
Question 18 Choose 1
You have the following dataset.

Which formula calculates the percent difference in sales relative to the same quarter the previous year as shown in the Calculation field?
Show answerHide answer

Correct answer: B (SUM ([Sales]) - LOOKUP (SUM ([Sales]), -4) ) / (LOOKUP (SUM ([Sales]), -4)

Explanation

Explanation

The question asks for the percent difference in sales compared to the same quarter of the previous year (YoY % change). In Tableau, when the view is broken down by quarter in chronological order, the value from the same quarter last year is accessed using LOOKUP(..., -4). The complete percent difference formula must subtract the previous value and then divide the result by that same previous value.

Correct Option:

✅ B. (SUM ([Sales]) - LOOKUP (SUM ([Sales]), -4) ) / (LOOKUP (SUM ([Sales]), -4) )
This is the official and most widely recommended Tableau formula for year-over-year percent change by quarter. It correctly computes (Current Sales – Sales 4 quarters ago) ÷ Sales 4 quarters ago, returning the true percentage growth or decline (e.g., 0.12 = +12%).

Incorrect Options:

❌ A. (SUM ([Sales]) - LOOKUP (SUM ([Sales]), -4))
This formula only calculates the absolute difference in sales (e.g., +$50,000). It completely misses the division step needed to convert the raw change into a percentage, so the result is expressed in currency units instead of a percent, making it incorrect for the requested “percent difference”.

❌ C. (SUM([Sales]) / (LOOKUP (SUM ([Sales]), -4)))
This produces a ratio rather than a percent difference (e.g., 1.15 means sales are now 115% of last year’s same quarter). While related, it is not the same as percent change; it requires subtracting 1 and formatting as percent to match the question, which this formula does not do.

❌ D. (ZN (SUM ([Sales]) ) - LOOKUP (ZN (SUM ([Sales]) ), -4) )
The ZN() function replaces nulls with zero to avoid errors, which can be helpful in some cases. However, this calculation still only returns the absolute difference (raw dollar change), not a percentage. It adds unnecessary complexity and fails to include the required division by the previous period’s value.

Reference:
Support Portal Experience Enhancements for Tableau Customers and Partners
Tableau Training – Table Calculations: https://www.tableau.com/learn/training
Question 19 Choose 1
You create a parameter named Choose Region fiat contains values from a field named Region.

You want users to be able to use the Choose Region parameter to interact with a chart by logging between different regions

What should you do next?
Show answerHide answer

Correct answer: B Add the [Region] = [choose Region) formula to the Filters card

Explanation

Explanation:

To make a chart dynamically interactive with a parameter, you need to link the parameter to the data so that Tableau knows how to filter the chart.

🟢 Correct Option: B – Add [Region] = [Choose Region] formula to the Filters card
✅ This is a calculated field that compares each row’s Region to the selected value in the Choose Region parameter.
✅ When a user selects a region in the parameter dropdown, only rows matching that region are displayed in the chart.
✅ This approach allows true interactivity, as the chart updates automatically based on user input.
✅ Without this calculated filter, the parameter alone has no effect on the visualization—it’s just a control with values.

Incorrect Options:

🔴 A – Add Region to the Filters card
❌ Simply adding Region to the Filters card allows static filtering only, meaning you must manually select a value each time.
❌ It does not make the chart dynamically respond to the Choose Region parameter.

🔴 C – Add the Choose Region parameter to the Pages card
❌ The Pages card is used for animating or paging through data (like showing each region one at a time).
❌ It does not filter the chart dynamically based on user selection in the way the parameter is intended here.

🔴 D – Set the Choose Region parameter to Single Value (list)
❌ Setting the display type to Single Value (list) only affects how the parameter appears on the dashboard.
❌ Without linking it via a calculated field to the Filters card, it will not filter the chart.

Step-by-Step Approach for Users:
Create the parameter Choose Region with all region values.
Create a calculated field: [Region] = [Choose Region].
Drag the calculated field to the Filters card and select True.
Show the parameter control on the dashboard for user interaction.
Now, users can select any region, and the chart updates dynamically.

Summary:
To make the chart interactive by region, you must create a calculated filter that links the parameter to the field ([Region] = [Choose Region]). Other options either filter statically, animate through data, or only change parameter appearance without filtering.

Reference:
Tableau Official Docs: Create Parameters
Tableau Official Docs: Get Started with Calculations in Tableau
Question 20 Choose 1
You have the following visualization.

You Create a table calculation named Rank_Score that has a formula of RANK(AVG([Score]), and you drag Rank_Score to Text on the Marks cards.

What is the Rank Score value for Student ID 4220?
Show answerHide answer

Correct answer: D 3

Explanation

Explanation

Table calculations like RANK() are computed based on the aggregated data present in the view. The function RANK(AVG([Score])) calculates a rank for the average score of each student within the partition and addressing defined by the view's structure. By default, the RANK function in Tableau assigns a rank of 1 to the highest value and increments for each lower value, creating a competitive ranking without ties unless specified.

✅ Correct Option

D. 3 ✅
The RANK(AVG([Score])) function operates by sorting all visible average scores in descending order by default, assigning the highest score a rank of 1.
For Student ID 4220 to receive a rank of 3, their average score must be the third-highest value in the current view's partition.
This calculation is dynamic and depends entirely on the data displayed and the table calculation's addressing and partitioning settings (e.g., computing along Table Across, Down, or within specific dimensions).

❌ Incorrect Options

A. 5 ❌
A rank of 5 would mean Student ID 4220 has the fifth-highest score. This is inconsistent with the described scenario where their score is notably higher.
This value typically results from an incorrect mental sort (ascending instead of descending) or a misunderstanding of how the view is partitioned.

B. 4 ❌
This rank suggests the student has the fourth-highest score. The discrepancy from the correct answer likely stems from miscounting the sorted order of students or misapplying the table calculation's scope.

C. 6 ❌
A rank of 6 is too low and would indicate a below-median performance for this student in the dataset. This is a clear miscalculation, as the correct rank of 3 places them in the top performers.

📝 Summary
The rank of 3 for Student ID 4220 confirms they are a top-tier performer in the dataset, with only two students achieving a higher average score based on the default descending sort of the RANK() table calculation.

📚 Reference
Tableau Help: RANK function - Official documentation details how the RANK table calculation works, including its default behavior (descending), handling of ties, and dependency on the visualization's addressing.
Full mock exam

Sit the Salesforce-Tableau-Data-Analyst exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real Salesforce-Tableau-Data-Analyst exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full Salesforce-Tableau-Data-Analyst mock exam
  • 60questions per mock
  • 105 mintime limit
  • 212questions in the bank
  • Newmock on every attempt