MCQs on Calculations and Functions | Tableau Calculations & Formulas

1. Introduction to Tableau Calculations

  1. In Tableau, what is the primary purpose of using calculations?
    a) To transform and summarize data
    b) To visualize data
    c) To connect to multiple data sources
    d) To create charts and graphs
  2. Which of the following can be used to create calculated fields in Tableau?
    a) The Calculation Editor
    b) The data connection interface
    c) The Dashboard Builder
    d) The Measures pane
  3. When working with calculations in Tableau, what type of data is typically used?
    a) Only numeric data
    b) Both numeric and string data
    c) Only date data
    d) Only categorical data
  4. What is a key difference between calculated fields and parameters in Tableau?
    a) Calculated fields store static values, while parameters store dynamic values
    b) Calculated fields are created based on the data, while parameters allow user input
    c) Parameters are used to filter data, while calculated fields are used to aggregate data
    d) Calculated fields allow user input, while parameters aggregate data
  5. Which of the following is an example of a simple calculation in Tableau?
    a) Sales + Profit
    b) Sorting data by category
    c) Filtering data by region
    d) Creating a dual-axis chart

2. Basic Calculations (SUM, AVG, COUNT, etc.)

  1. What is the purpose of the SUM function in Tableau?
    a) To find the average of a measure
    b) To count the number of distinct values
    c) To calculate the total of a numeric field
    d) To round a number to a certain decimal place
  2. Which Tableau function would you use to calculate the average of a set of numbers?
    a) AVG
    b) SUM
    c) COUNT
    d) MIN
  3. The COUNT function in Tableau returns the:
    a) Number of records in the data set
    b) Number of unique values in a field
    c) Number of non-null records in a field
    d) Total sum of the records
  4. When would you use the COUNTD function in Tableau?
    a) To find the sum of values in a field
    b) To calculate the distinct number of values in a field
    c) To find the average of a field
    d) To count all values in a field, including nulls
  5. Which function should be used to calculate the minimum value in a field in Tableau?
    a) MAX
    b) MIN
    c) SUM
    d) AVG

3. Row-Level and Aggregate Calculations

  1. What is the difference between row-level and aggregate calculations in Tableau?
    a) Row-level calculations operate on a row-by-row basis, while aggregate calculations operate on entire datasets
    b) Row-level calculations can only be used with string fields, while aggregate calculations work only with numeric fields
    c) Row-level calculations summarize data, while aggregate calculations filter data
    d) Aggregate calculations operate on a row-by-row basis, while row-level calculations work on entire datasets
  2. Which type of calculation is typically used when creating a KPI (Key Performance Indicator)?
    a) Row-level calculation
    b) Aggregate calculation
    c) Table calculation
    d) String function calculation
  3. How do aggregate calculations in Tableau treat null values?
    a) Null values are automatically excluded from calculations
    b) Null values are treated as zero
    c) Null values are ignored by Tableau
    d) Null values are included in the calculations
  4. What function should be used to calculate the average sales per row in Tableau?
    a) SUM([Sales])
    b) AVG([Sales])
    c) COUNT([Sales])
    d) AVG(SUM([Sales]))
  5. Which of the following calculations is performed at a row-level in Tableau?
    a) Total Sales
    b) Sales per Customer
    c) Average Sales
    d) Count of Orders

4. Logical Functions (IF, CASE, etc.)

  1. In Tableau, which logical function is used to check a condition and return a specific result if the condition is true?
    a) IF
    b) CASE
    c) SWITCH
    d) AND
  2. How is the CASE function different from the IF function in Tableau?
    a) CASE allows for multiple conditions, while IF only allows one condition
    b) CASE is used for non-numeric data, while IF works with numeric data only
    c) CASE matches a value to different conditions, while IF evaluates boolean expressions
    d) There is no difference between CASE and IF
  3. What does the following Tableau expression do?
    IF [Sales] > 500 THEN "High" ELSE "Low" END
    a) It categorizes sales into “High” and “Low” based on a threshold of 500
    b) It calculates the sum of sales above 500
    c) It averages the sales greater than 500
    d) It displays all sales values less than 500 as null
  4. Which logical function would you use to check multiple conditions and return a result if all conditions are true?
    a) IF
    b) AND
    c) CASE
    d) OR
  5. What does the following logical expression in Tableau do?
    IF [Category] = "Furniture" AND [Sales] > 100 THEN "Eligible" ELSE "Not Eligible" END
    a) It classifies sales as “Eligible” or “Not Eligible” based on both category and sales conditions
    b) It checks if the category is “Furniture”
    c) It calculates the sum of eligible sales
    d) It filters out “Furniture” sales

5. String Functions (CONTAINS, LEFT, MID, etc.)

  1. Which of the following Tableau string functions is used to extract a substring from a field starting from a specified position?
    a) LEFT
    b) RIGHT
    c) MID
    d) FIND
  2. What does the CONTAINS function do in Tableau?
    a) It checks if a string contains a specific substring
    b) It finds the position of a substring in a string
    c) It replaces a substring with another substring
    d) It counts the number of characters in a string
  3. Which function in Tableau would you use to extract the first 5 characters from a string?
    a) LEFT
    b) MID
    c) RIGHT
    d) FIND
  4. In Tableau, the TRIM function is used to:
    a) Remove extra spaces at the start and end of a string
    b) Shorten a string to a specific length
    c) Convert text to uppercase
    d) Replace spaces with a custom delimiter
  5. The UPPER function in Tableau is used to:
    a) Convert all text to lowercase
    b) Convert all text to uppercase
    c) Replace spaces with underscores
    d) Trim extra spaces from a string

6. Date Functions (DATEPART, DATEDIFF, etc.)

  1. What does the DATEPART function do in Tableau?
    a) Extracts a specific part of a date (such as year, month, or day)
    b) Converts a string into a date
    c) Calculates the difference between two dates
    d) Adds a time component to a date
  2. Which of the following is the correct syntax for calculating the difference between two dates in Tableau?
    a) DATEDIFF([Start Date], [End Date])
    b) DATEADD([Start Date], [End Date])
    c) DATEPART([Start Date], [End Date])
    d) DAYDIFF([Start Date], [End Date])
  3. The DATEADD function in Tableau is used to:
    a) Add a specific number of days to a date
    b) Extract the year part from a date
    c) Subtract days from a date
    d) Format a date
  4. Which function would you use in Tableau to return the month of a date field?
    a) MONTH
    b) DATEPART
    c) YEAR
    d) DATEDIFF
  5. What does the DATEDIFF function calculate in Tableau?
    a) The number of days between two dates
    b) The difference between two date parts (e.g., months or years)
    c) The part of the date (e.g., year, month)
    d) The sum of dates

Answers (Table Format)

QnoAnswer
1a) To transform and summarize data
2a) The Calculation Editor
3b) Both numeric and string data
4b) Calculated fields are created based on the data, while parameters allow user input
5a) Sales + Profit
6c) To calculate the total of a numeric field
7a) AVG
8c) Number of non-null records in a field
9b) To calculate the distinct number of values in a field
10b) MIN
11a) Row-level calculations operate on a row-by-row basis, while aggregate calculations operate on entire datasets
12b) Aggregate calculation
13b) Null values are treated as zero
14b) AVG([Sales])
15b) Sales per Customer
16a) IF
17c) CASE matches a value to different conditions, while IF evaluates boolean expressions
18a) It categorizes sales into “High” and “Low” based on a threshold of 500
19b) AND
20a) It classifies sales as “Eligible” or “Not Eligible” based on both category and sales conditions
21c) MID
22a) It checks if a string contains a specific substring
23a) LEFT
24a) Remove extra spaces at the start and end of a string
25b) Convert all text to uppercase
26a) Extracts a specific part of a date (such as year, month, or day)
27a) DATEDIFF([Start Date], [End Date])
28a) Add a specific number of days to a date
29a) MONTH
30b) The difference between two date parts (e.g., months or years)

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top