0
0
Tableaubi_tool~10 mins

Data model best practices in Tableau - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a relationship between two tables in Tableau.

Tableau
CREATE RELATIONSHIP BETWEEN [1] AND Customers ON CustomerID
Drag options to blanks, or click blank then click option'
AProducts
BSales
COrders
DEmployees
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a table that does not have CustomerID.
Confusing joins with relationships.
2fill in blank
medium

Complete the code to define a star schema in Tableau data model.

Tableau
FactTable [1] DimensionTable ON KeyField
Drag options to blanks, or click blank then click option'
AUNION
BRELATE
CJOIN
DMERGE
Attempts:
3 left
💡 Hint
Common Mistakes
Using JOIN which physically combines tables and can cause data duplication.
Using UNION which stacks tables vertically.
3fill in blank
hard

Fix the error in the Tableau data model expression to avoid data duplication.

Tableau
SELECT * FROM Sales [1] Customers ON Sales.CustomerID = Customers.CustomerID
Drag options to blanks, or click blank then click option'
ARIGHT JOIN
BLEFT JOIN
CINNER JOIN
DRELATIONSHIP
Attempts:
3 left
💡 Hint
Common Mistakes
Using INNER JOIN or LEFT JOIN causing duplicated rows.
Confusing SQL join syntax with Tableau relationships.
4fill in blank
hard

Fill in the blank to create a calculated field that counts unique customers in Tableau.

Tableau
COUNTD([1])
Drag options to blanks, or click blank then click option'
ACustomerID
BProductID
CSalesAmount
DOrderID
Attempts:
3 left
💡 Hint
Common Mistakes
Using COUNT instead of COUNTD which counts duplicates.
Using OrderID which counts orders, not customers.
5fill in blank
hard

Fill both blanks to write a Tableau LOD expression that calculates total sales per region.

Tableau
{ FIXED [1] : SUM([2]) }
Drag options to blanks, or click blank then click option'
ARegion
BSales
CCustomerID
DOrderDate
Attempts:
3 left
💡 Hint
Common Mistakes
Using CustomerID or OrderDate which do not aggregate sales.
Not fixing the calculation at the correct level.