0
0
Tableaubi_tool~10 mins

Blending data sources 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 primary data source connection in Tableau.

Tableau
PRIMARY_CONNECTION = tableau.[1]('Sales_Data')
Drag options to blanks, or click blank then click option'
Ablend
Bconnect
Cjoin
Dextract
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'blend' instead of 'connect' to start a data source.
Confusing 'join' with connecting data sources.
2fill in blank
medium

Complete the code to blend a secondary data source on a common field.

Tableau
blend = primary.blend(secondary, on='[1]')
Drag options to blanks, or click blank then click option'
ARegion
BDate
CProductID
DCustomerName
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a field that does not exist in both data sources.
Using a unique identifier that is not common across sources.
3fill in blank
hard

Fix the error in the code to correctly blend data sources in Tableau.

Tableau
blended_data = primary.blend(secondary, on=[1])
Drag options to blanks, or click blank then click option'
Aregion
BRegion
C"Region"
D'Region'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the field name without quotes causing syntax errors.
Using incorrect capitalization without quotes.
4fill in blank
hard

Fill both blanks to create a calculated field that sums sales from the primary and secondary sources.

Tableau
Total_Sales = [1] + [2]
Drag options to blanks, or click blank then click option'
ASUM([Primary].[Sales])
BAVG([Primary].[Sales])
CSUM([Secondary].[Sales])
DCOUNT([Secondary].[Sales])
Attempts:
3 left
💡 Hint
Common Mistakes
Using AVG or COUNT instead of SUM for sales totals.
Mixing up primary and secondary source references.
5fill in blank
hard

Fill all three blanks to filter blended data for the year 2023 and region 'West'.

Tableau
filtered_data = blended_data.filter([1] == [2]).filter([3] == 'West')
Drag options to blanks, or click blank then click option'
AYear
B2023
CRegion
DMonth
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect field names like 'Month' instead of 'Year'.
Not quoting the year value correctly.