Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a new dashboard in Tableau.
Tableau
dashboard = workbook.[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a method name that does not exist in the Tableau API.
Confusing dashboard creation with worksheet creation.
✗ Incorrect
In Tableau's Python API, add_dashboard() is used to add a new dashboard to the workbook.
2fill in blank
mediumComplete the code to set the size of the dashboard to 1200x800 pixels.
Tableau
dashboard.[1] = (1200, 800)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a method instead of a property.
Using camelCase instead of lowercase property names.
✗ Incorrect
The size property sets the width and height of the dashboard in Tableau.
3fill in blank
hardFix the error in the code to add a worksheet to the dashboard.
Tableau
dashboard.[1](worksheet) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase method names which are not valid in Tableau's Python API.
Using 'addSheet' or 'addWorksheet' which are incorrect.
✗ Incorrect
The correct method to add a worksheet to a dashboard in Tableau is add_sheet().
4fill in blank
hardFill both blanks to set the dashboard title and make it visible.
Tableau
dashboard.[1] = 'Sales Overview' dashboard.[2] = True
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect property names like 'dashboard_title' or 'display_title'.
Not setting the visibility property to True.
✗ Incorrect
The title property sets the dashboard's title text, and show_title controls its visibility.
5fill in blank
hardFill all three blanks to add a filter action to the dashboard.
Tableau
filter_action = dashboard.[1](source_sheet=[2], target_sheet=[3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect method names like 'create_filter'.
Mixing up source and target worksheet variables.
✗ Incorrect
The method add_filter_action adds a filter action. You specify the source and target worksheets to connect.