Bird
Raised Fist0
Tableaubi_tool~15 mins

URL actions in Tableau - Real Business Scenario

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Scenario Mode
👤 Your Role: You are a sales analyst at an e-commerce company.
📋 Request: Your manager wants an interactive sales dashboard where users can click on a product category and be taken directly to the product page on the company website for more details.
📊 Data: You have monthly sales data by product category including Category Name, Month, Sales Amount, and Number of Orders.
🎯 Deliverable: Create a Tableau dashboard showing monthly sales by category with a URL action that opens the product category page on the company website when a user clicks on a category.
Progress0 / 7 steps
Sample Data
CategoryMonthSalesOrders
Electronics2024-0115000120
Electronics2024-0218000140
Clothing2024-0112000200
Clothing2024-0213000210
Home & Garden2024-01900080
Home & Garden2024-021100095
Sports2024-01700060
Sports2024-02850070
1
Step 1: Connect to the sales data source in Tableau and load the data.
Use the provided data table with columns: Category, Month, Sales, Orders.
Expected Result
Data is loaded and visible in Tableau data pane.
2
Step 2: Create a line chart showing Sales over Month for each Category.
Rows: SUM(Sales), Columns: Month, Color: Category, Detail: Category
Expected Result
Line chart displays monthly sales trends for each product category.
3
Step 3: Create a calculated field named 'Category URL' to build the URL for each category's product page.
Formula: 'https://www.companywebsite.com/products/' + REPLACE(LOWER([Category]), ' ', '-')
Expected Result
Calculated field returns URLs like 'https://www.companywebsite.com/products/electronics'.
4
Step 4: Add the 'Category URL' field to the worksheet (hidden if needed).
Drag 'Category URL' to Detail on Marks card.
Expected Result
Each category has its URL associated in the view.
5
Step 5: Create a dashboard and add the sales line chart worksheet.
Drag worksheet to dashboard canvas.
Expected Result
Dashboard shows the sales line chart.
6
Step 6: Add a URL action to the dashboard that opens the category product page when a user clicks on a category.
Dashboard > Actions > Add Action > URL. Set URL to [Category URL]. Run action on Select.
Expected Result
Clicking a category in the chart opens the corresponding product page in a web browser.
7
Step 7: Test the URL action by clicking on different categories in the dashboard.
Click on 'Electronics' line or legend item.
Expected Result
Browser opens 'https://www.companywebsite.com/products/electronics'.
Final Result
Dashboard: Monthly Sales by Category

+---------------------------------------+
| Month   | Electronics | Clothing | Home & Garden | Sports |
|---------|-------------|----------|---------------|--------|
| 2024-01 | 15000       | 12000    | 9000          | 7000   |
| 2024-02 | 18000       | 13000    | 11000         | 8500   |
+---------------------------------------+

[Click a category line to open its product page in your browser]
Electronics category has the highest sales and shows growth from January to February.
Clothing category has steady sales with slight increase.
Home & Garden and Sports have lower sales but show positive trends.
URL actions enable quick access to detailed product pages directly from the dashboard.
Bonus Challenge

Enhance the dashboard by adding a filter for Month and update the URL action to include the selected month as a query parameter in the URL.

Show Hint
Create a calculated field that concatenates the base URL with '?month=' + [Month] and use this field in the URL action.

Practice

(1/5)
1. What is the primary purpose of URL actions in Tableau dashboards?
easy
A. To export dashboard data to Excel files
B. To link dashboard elements to external web pages or resources
C. To filter data within the dashboard automatically
D. To change the color of dashboard charts dynamically

Solution

  1. Step 1: Understand URL actions functionality

    URL actions allow dashboard elements to open web pages or external resources when triggered.
  2. Step 2: Compare other options

    Changing colors or filtering data are done by other Tableau features, not URL actions.
  3. Final Answer:

    To link dashboard elements to external web pages or resources -> Option B
  4. Quick Check:

    URL actions = link to web pages [OK]
Hint: URL actions connect dashboards to websites or files [OK]
Common Mistakes:
  • Confusing URL actions with filters
  • Thinking URL actions change dashboard visuals
  • Assuming URL actions export data
2. Which of the following is the correct syntax to insert a field value into a URL action in Tableau?
easy
A. http://example.com/product=[Product ID]
B. http://example.com/product=<[Product ID]>
C. http://example.com/product=<Product ID>
D. http://example.com/product=Product ID

Solution

  1. Step 1: Identify Tableau field insertion syntax

    Tableau uses angle brackets around the exact field name without brackets inside, like <Product ID>.
  2. Step 2: Check options for correct syntax

    http://example.com/product=<Product ID> correctly uses <Product ID> without extra brackets or symbols.
  3. Final Answer:

    http://example.com/product=<Product ID> -> Option C
  4. Quick Check:

    Field insertion = <Field Name> [OK]
Hint: Use <Field Name> exactly to insert field values in URLs [OK]
Common Mistakes:
  • Adding extra brackets inside angle brackets
  • Using square brackets inside URL
  • Forgetting angle brackets around field name
3. Given a URL action set as http://sales.com/details?region=<Region>&product=<Product>, what URL will open when a user clicks on a data point with Region = 'West' and Product = 'Shoes'?
medium
A. http://sales.com/details?region=<Region>&product=<Product>
B. http://sales.com/details?region=West&product=
C. http://sales.com/details?region=Shoes&product=West
D. http://sales.com/details?region=West&product=Shoes

Solution

  1. Step 1: Substitute field values into URL

    Replace <Region> with 'West' and <Product> with 'Shoes' in the URL template.
  2. Step 2: Verify correct order and values

    The URL becomes http://sales.com/details?region=West&product=Shoes exactly as in http://sales.com/details?region=West&product=Shoes.
  3. Final Answer:

    http://sales.com/details?region=West&product=Shoes -> Option D
  4. Quick Check:

    Field values replace placeholders correctly [OK]
Hint: Replace placeholders with actual field values in URL [OK]
Common Mistakes:
  • Mixing up field values order
  • Not replacing placeholders
  • Leaving placeholders unchanged
4. You created a URL action but clicking it does nothing. Which of the following is the most likely cause?
medium
A. The URL contains incorrect field syntax like missing angle brackets
B. The dashboard filter is not applied
C. The data source is not refreshed
D. The worksheet has no filters

Solution

  1. Step 1: Check URL action syntax

    If the URL syntax is wrong, such as missing < and > around fields, Tableau cannot build the URL properly.
  2. Step 2: Understand other options

    Filters or data refresh issues do not prevent URL actions from triggering clicks.
  3. Final Answer:

    The URL contains incorrect field syntax like missing angle brackets -> Option A
  4. Quick Check:

    Incorrect syntax blocks URL action [OK]
Hint: Check angle brackets around fields in URL [OK]
Common Mistakes:
  • Ignoring syntax errors in URL
  • Blaming filters for URL action failure
  • Not testing URL outside Tableau
5. You want to create a URL action that opens a Google search for the selected product name. Which URL template should you use to make the search dynamic?
hard
A. https://www.google.com/search?q=<Product Name>
B. https://www.google.com/search?q=Product Name
C. https://www.google.com/search?q=[Product Name]
D. https://www.google.com/search?q={Product Name}

Solution

  1. Step 1: Identify correct field insertion syntax

    Tableau requires angle brackets around the exact field name to insert dynamic values, so <Product Name> is correct.
  2. Step 2: Check URL format for Google search

    The URL https://www.google.com/search?q= followed by the field value creates a dynamic search link.
  3. Final Answer:

    https://www.google.com/search?q=<Product Name> -> Option A
  4. Quick Check:

    Dynamic URL uses <Field Name> syntax [OK]
Hint: Use <Field Name> to insert dynamic values in URLs [OK]
Common Mistakes:
  • Using brackets other than angle brackets
  • Hardcoding field names as text
  • Forgetting to include query parameter 'q='