Friday, January 25, 2013

Filter Actions (Linking) and Highlight Actions (Brushing) in Tableau

Today, we will talk about using Filter and Highlight Actions in Tableau.  Depending on your location, you may heard these referred to as Linking and Brushing.  I primarily use these on Dashboards; but they can be used on individual worksheets as well.  I will use the Superstore Sales sample data in Tableau.

Step 1: 
  • Create your dashboard.
Dashboard without Actions
Step 2: 
  • Select Dashboard -> Actions -> Add Action -> Filter.  
  • For the "Source Sheet", select "Dashboard", and make sure that "Profit by State" is the only box checked.
  • For the "Target Sheet", select "Dashboard", and make sure that "Sales by Sub-Category" is the only box checked.
  • Choose "Run Action on: Select."  
  • Choose "Clearing the selection will: Show all values."
  • Choose "Target Fields: Selected Fields"
  • Then choose "Add Filter -> State"
Dashboard with Filter Action
Now, when I click on Montana, the graph in the bottom-right is filtered to include only values in Montana.  You can easily undo the filter by clicking an empty space on the map (This is why we chose "Clearing the selection will: Show all values").

Step 3: 
  • Select Dashboard -> Actions -> Add Action -> Highlight.  
  • For the "Source Sheet", select "Dashboard", and make sure that "Profit by State" is the only box checked.
  • For the "Target Sheet", select "Dashboard", and make sure that "Profit Ratio vs. Time to Ship" is the only box checked.
  • Choose "Run Action on: Hover."
  • Choose "Target Fields: Selected Fields", and make sure that "State" is the only box checked.
Dashboard with Highlight Action
Now, when I hover over Montana, the circle corresponding to Montana is highlighted on the scatterplot.  There's so much more that can be done with Actions, you can combine highlight and filter actions, you can use filter actions to take you to a completely different dashboard, you can even use a URL action to take you a website.  Experiment with this and you will experience a whole new world within Tableau.  Thanks for Reading.

Brad Llewellyn
Associate Consultant
Mariner, LLC
llewellyn.wb@gmail.com
https://www.linkedin.com/in/bradllewellyn

18 comments:

  1. Brad, do you have any exp in what if analysis in tableau ? can you show me some demo using sliders kind of in tableau ?

    ReplyDelete
  2. Harihara,

    That's a great idea for a new blog post. Stay tuned, I'll try to get it up this week.

    Thanks :D

    ReplyDelete
  3. Hi Brad,

    Is it possible to link sheet for particular bar in a bar graph?

    Regards,
    S. Harinath

    ReplyDelete
    Replies
    1. S. Harinath,

      If I understand your question, you're asking if there is a way to click on a bar in a bar graph and show the underlying information on another chart. This is easily achievable. Simply create a filter action on the bar graph and include any/all the dimensions you would like the secondary chart filtered on. Please let me know if this helps

      Delete
  4. Hi Brad,

    I'm using an action filter for a bar graph and underlying data. The data correlating to a selected bar shows up properly. I have one issue: when I click a bar, the rest of the graph disappears. Any ideas how to fix this?

    ReplyDelete
    Replies
    1. I'm not entirely sure what you mean. Any chance you could email me the .twbx or a mock-up? If that is not possible, could you email me a screenshot?

      Thanks,

      Brad Llewellyn

      Delete
    2. I fixed the issue, I had two target sources selected instead of one!

      Delete
    3. Dee Iam facing something similar to your issue,I have applied action fiter to all reports,If I select any bar graph,in map its shows only few states and the remaining states are disappearing is there any way to fix this issue

      Delete
    4. Brad can you pls suggest any solution for this

      Delete
    5. Vaishnavi,

      Thanks for commenting! That's an interesting issue. Any chance you could send me a mock-up or .twbx?

      Thanks!

      Delete
  5. Hi Brad,
    I have a dashboard which has two sheets in it one showing current month's sale data for different categories and other showing year over year data(current year and previous year) for that month. So, I have a filter for the first sheet for selecting month_year and other sheet has a filter of just month. When I select first filter with month it should automatically populate the second sheet data corresponding to the month selected in first filter....tried doing this with Action, but was not successful. any thoughts on this pls ?
    -Vishnu

    ReplyDelete
    Replies
    1. Vishnu,

      Thanks for commenting. I published a simple example that I think may solve your issue.

      https://public.tableausoftware.com/views/YearoverYearGrowthwithGlobalMonthfilter/SalesbyCategory?:embed=y&:display_count=no

      Does this help?

      Delete
  6. Hi Brad,
    Thanks for your suggestions and i would like to know how to clear the actions to default when we go back to the previous dashboard from second to first.For ex:if we take state/sales in dashboard1 and City/sales in Dashboard2.Applying the Action on source(Dashboard1) to target(dashboard2),we will get the city/sales for the respective State in Dashboard1.Now i would like to do,when i will go back to my dashboard1 the actions on dashboard2 will clear from the current to its default.

    ReplyDelete
  7. Hi Brad,
    Thanks for your suggestions and i would like to know how to clear the actions to default when we go back to the previous dashboard from second to first.For ex:if we take state/sales in dashboard1 and City/sales in Dashboard2.Applying the Action on source(Dashboard1) to target(dashboard2),we will get the city/sales for the respective State in Dashboard1.Now i would like to do,when i will go back to my dashboard1 the actions on dashboard2 will clear from the current to its default.

    ReplyDelete
  8. Hi Brad,
    How to change the hightlight color,
    by default we are getting the blue color I want to change the color is it possible how we have to change the color

    ReplyDelete
  9. Hi Brad,
    I have Dashboard that has two sheets. One is "Header" and the other is "detail". I also have two more sheets(not presented on the Dashboard) in the same Workbook. On the Dashboard I have three Quick filters on the Header. I created Action for the Dashboard so when I select single summary record on the Header it shows me Detail records in the Detail sheet on the dashboard. And it is OK. I want the other two sheets would be filtered according the Header selection record. So I created to more actions with the Header as a source and target as shhet1 and sheet2. But what happened now? As soon as I selected single record on the Header from the Dashboard I was brought to the sheet1 of the workbook (filter was applied to it which is good) and when I click on the sheet2 of the workbook the filter was applied as well, but my detail portion from the dashboard was not appeared at all. When I removed Action 2 and Action 3 and got only one action then Detail portion of the Dashboard works OK , but I do not get filtered on the sheet1 and sheet2. How I can get filter on sheet1 and sheet2 along with the Detail portion of the Dashboard? I have Tableau 8.3. Thank you very much in advance. Berta.

    ReplyDelete
  10. This is very helpful. Thanks!

    ReplyDelete
  11. This is very helpful.
    Thank you!

    ReplyDelete