Welcome to Tableau in 2 Minutes. Adding interactivity to your Tableau dashboards can make it much more engaging for your users, and make the dashboards much more flexible. In this video, we'll walk you through how to add interactivity to your dashboards using different actions. We'll cover five types of actions. We'll cover filter actions, highlight actions, navigation actions, set actions, and parameter actions. I'll show you what each one does, and then I'll show you how I built it on the back end. This workbook is pretty bare bones. There isn't much in the way of formatting. I want to show you that it's just the actions that are making the changes in the visuals. There's no other formatting or other fancy trickery going on. Most of these actions are simple to set up, but if you use them in the right way, they can really make your dashboards stand out. They can make them more flexible, and they can make your stakeholders much happier. If you're ready, let's go ahead and get started.
The first set of actions that we're going to look at are filter actions. Filter actions allow you to filter what is in one visualization by clicking on a different visualization. So, what I mean by that is in these two visualizations at the bottom, I can click on, for example, my offline TA/TO segment, or my group segment, and that refilters the other two graphs on the page to reflect only what is in this particular item. If we do the same over here by room type, you can see that both the revenue trending line at the top and the market segment bar graph on the side both change to reflect only what is happening in each of these particular room types. And up here at the top, you can click on an individual month, or an individual year, and that's going to filter the two graphs down at the bottom just to reflect what's happening in that month or that year.
Filter actions are super easy to set up. To do it, all you need to do is click on this little filter icon here on each of the visualizations, and you'll be able to use them as a filter. Click it off, and it stops being used as a filter.
Now, if you want more control over these filter actions, you can go into the dashboard menu, you can open up the Actions dialog box. This will have just a handful of actions on it for you, but obviously I have a bunch of other actions built into this sheet. So, don't worry about—or this workbook rather—so don't worry about that too much, but click on this sheet and you'll see the filter actions that we just created when we clicked on the filter icon. If you click on Edit for any of these, you can customize what drives the filter action. So, the source sheet is going to be the sheet that you click on. In this case, this is the revenue by room type sheet and it filters the market segment, the room type, and the trending sheet. You can also select whether you want the sheets to filter whether you hover over a value, when you select a value, or on a menu. You can have it select multiple things, or you can check this box to have it only select one thing. And down here you can decide what clearing the selection does. So, is it going to keep the filtered values, or is it going to go back to showing all values, or is it going to show nothing at all? And then finally down here at the bottom, you can change the fields that you wanted to filter on. So, if you only wanted it to filter on one or two of the fields in a particular view, you can customize that down here, and you can customize which targets they go to. So, that would be this would be the The source is the sheet that you click on, the target is the sheet that is filtered by it.
If you want to customize it further, you can actually go into this sheet, and you can use this Ignore Actions item. What Ignore Actions does is it means that if we, for example, filtered on aviation here, you can see that we don't have all of the room types represented. We could go in here and we could say go under here, and we could ignore actions, and that will stay static regardless of what we click on. If we want to go back in and have it listen to the actions again, what we need to do is we need to jump into our dashboard menu, go down to Actions, and then we're going to find our filters here. We're going to edit them to include again that revenue by room type graph. So, when we said Ignore Actions, you can see what happened is that it actually unchecked this box in each of our Action dialog box.
All right, so that's a quick overview of filter actions, along with how you build them. Let's move on to highlight actions.
Highlight actions are quite similar to filter actions in that you click on one item, and it highlights things in other visualizations. So, here you can see that we click on the segment, and then it highlights something in our trending graph up at the top. Now, this works both ways. If we click on something in our trending graph, that's also going to highlight something down in our segment room nights, ADR, and revenue graph down here at the bottom. And if we click on something up in the legend, that will do the same thing.
Setting these up is also pretty straightforward. Let's go ahead and dive onto this next sheet. You'll find that on this dashboard nothing happens when we click within the visualizations. We do still get the highlight when we click on something in the legend. That's on by default. But if we wanted to add it so that it works between the two visualizations, it's very simple. We're just going to go into Dashboard, we're going to go into the Actions menu. I'm going to click on this sheet, so it just shows the actions running on this particular dashboard. You'll see there's nothing set up right now, but if we go to Add Action, we'll go to Highlight.
The source sheets, we want to have both the revenue highlight revenue trending and the segment room nights, ADR, and revenue highlighted. And we want both of them highlighted as target fields as well. And we can also select all fields, we can have it highlight just dates and times, or we can highlight selected fields depending on which one we want to do. Now, we don't have an arrival date month or an arrival date year in our segment room nights ADR and revenue sheet, so we're just going to go ahead and select market segment. That way nothing weird happens when we click on different months or years.
Again, we can customize whether we want to run the action on hover, the select, or whether we want to run it through a sub-menu. Select is a great option. That means that people actually have to click on things to have them happen. Sometimes with hover it can be a bit jumping around all over the place. So, we're going to leave it on Select. We'll click OK, hit OK again, and you'll see that we have our highlight action set up. Dead simple.
All right, let's move on to navigation actions.
Navigation actions allow you to use a visualization to navigate between different sheets. So, what's going to happen is when I click on something in this list, it's going to take us back to the highlight actions dashboard. So, here we go. I'll click on Corporate, and you'll see it takes us back to the Highlight Actions dashboard. Now, there's obviously no relevance to this particular navigation action. When you unclick nothing happens, and then when you click again, it takes us back to it. If you wanted to dive deep into a corporate dashboard, you wanted to dive deep into one of these particular segments, and you had a dashboard specific to that, then being able to click on something and then dive to a different dashboard can be a really useful feature. You can also use this to set up different looking buttons than some of the default buttons if you wanted to do that as well.
To set one of these actions up, again, very, very simple. Just dive into our Dashboard menu, select Actions, select this sheet again, and then click Add Action. We're going to Go to Sheet. This is going to bring up our Go to Sheet action, the navigation action, and you can see that what we want to happen is when we click on this particular visualization, we want to go to—and here we can select any of the sheets in our workbook, any of the visible sheets in our workbook. So, we're going to click on Highlight Actions.
Again, we can run this action on hover, select, or via a sub-menu, or when only a single item is selected. We're going to leave this as Select. If you run it on Hover, this is really dangerous. Every time the mouse pops over one of those things, you end up navigating to a new dashboard. Not ideal. Go ahead and click OK, and then you'll see that we have our navigation actions built.
Let's go ahead and move on to set actions.
Okay, so set actions are one of the more complicated actions along with parameter actions, and what set actions allow you to do is they allow you to move items in or out of a set based on what you select in a visualization. So, the way I have it set up here, what the different room types I select down at the bottom are going to move in and out of a different set up at the top, and that's going to give us a comparison. So, if I go ahead and click on room type A, you'll see that now we have two different lines. We have a line for what is in the set, that's room type A, and we have a line for what's out of the set. That's all of these other darker lines. What's good about this is we can change our comparison. So, if we want to have multiple room types in the set, we can do that. If we want a single room type in the set, we can do that. And it allows us to compare the items that we've grouped together as part of the set to the items that are not in the set. So, if you want to do any sort of benchmarking, if you want a lot to allow people to do custom comparisons and things like that, you can do that using these set actions and having it be driven by different visualizations.
Building them is a little more in-depth than some of the actions that we've worked through so far, but what I'll do is I'm just going to dive to this very first sheet, and you'll see that we have a set here for the assigned room type. Now, this is the assigned room type, this line. What we want to do to create that set, we just click on this down arrow, we create a set, and we don't need to select anything to be included in the set at this point. Now, I'm going to use the one that I already created, so I'm not going to create that one. This is the set right here.
Then what we want to do is we want to jump back to our dashboard, and we're going to go into our other visual here. Now, you'll see that right now there's nothing in the set, which is why we only have one line on the graph. But we do have the set as driving our color on our color shelf here. And to do that, obviously you just drag it out to the color shelf. But what that means is the items that are out of the set will be gray, items that are in the set will be blue. We can jump in here. We can change the colors if we want to do that, but right now the default colors are fine.
Now, the magic happens when we go into the dashboard and the Actions menu up here. To change the values in the set dynamically, we're going to go down here to Add Action, jump into this Change Set Values action, and then we're going to select as the source sheet just the sheet that we want to use to drive the values. So, in this case, this is the revenue by room type sheet. We want it to be when we select something, not when we hover over something. Although, you can actually use a hover over run for different sets. And then we want to select our target set. So, right now we have none selected. We want to use the assigned room type set. Again, we want to make sure that this data type matches what we have in our visualizations. And then we want to say that running the action is going to either assign values to the set, add values to the set, or remove values from the set. Depending on how we want the visualization to act and what we've added or taken out of the set beforehand, these will do different things. Worth playing around with them just to see how it works. So, when we assign values to the set, that's going to add the values to the set that we select. And then when we clear the selection, we want to either add all values to the set, remove all values from the set, or keep set values. We're going to select Remove all values from the set. What I want to happen is when we click on something in the visualization, it will add it to the set, we can do the comparison, and then when we click off it, it will remove it from the set, so we just go back to having one individual line at the top. Again, you can customize this behavior depending on how you want to do your comparisons. Let's go ahead and click OK, and then we'll test it out.
And you can see if we had multiple room types, or whether we just keep a single room type, we get our nice comparison up at the top using our set action.
All right, thanks for bearing with me so far. We've got one more to do. Let's jump into parameter actions.
All right, thanks for sticking with me so far. Let's get into our last example here. This is parameter actions. And why might you want to change the value of a parameter using what's in your visualization? Well, I'll give you a couple of examples. On the left-hand side here, you can change the value of this reference line by clicking at different points on the graph. So, you can compare across the graph. You know, this revenue number from April, we can see whether that was higher or lower than other months that might be a little bit too far away for us to really see with the eye. On this graph on the right-hand side here, we can select a different number of points, or a single point, and it adds up the revenue for those data points across our data source. So, a couple of interesting use cases there. Let's dive into how we built them.
So, the first one on the left-hand side, to set up the dynamic reference line, we're going to go to the sheet, and most of the work that we do for this one is going to be on this sheet. You can see that we have our line here. Right now nothing happens when we click on anything. We have a parameter set up. It's called the reference parameter down here, but you'd want to dive into this menu, go Create Parameter, and then you want to set up a new parameter with a meaningful name. The data type for this you want to be Float because it's going to be a number based on where we click on this graph, and it's okay to have it be both 1 and 1 in this particular format.
Once we've created that parameter, we want to add a reference line to our visualization. We're going to add it so that it goes all the way across the table. The value we're going to set to be the parameter that we just created, or in this case the reference parameter. That's what we were using earlier on. We want to label it with We can label it with the computation, or we can just label it with the value. That way it shows the number across the line. And then you can customize everything else. So, if you wanted to format the line differently, that's totally okay. But we still don't have it changing as we click on different items. To do that, again, we're going to drive We're going to jump onto our dashboard here.
So, to set up our dynamic reference line, what we're going to do is we're going to go into the Dashboard menu, we're going to click on Actions the way we've been doing. I'm going to highlight this sheet. Um Just going to remove that value because we don't want that. Then we're going to click on Add Action, Change Parameter Values. In this case, we want to select the source sheet. So, in this case, I believe this one is this sheet on the left-hand side. We want the action to run when we select something, and we want our target parameter to be the reference parameter. That's the parameter that we set as the value for our reference line. The source field that we want to use is the sum of revenue, and we can choose to aggregate that however we want. There's actually no requirement to have it aggregated the same way in here that you do in your visualization. And finally, we can choose what happens when we clear the selection. In this case, I actually want to set it to zero, so that the reference line disappears down at the bottom of the page once we have removed our selection. That way it's a nice and clean visual. We don't have a reference line just hanging out there when we're not using it. Go ahead and click on OK. Go ahead and click on OK. And let's test out our dynamic reference line. You can see it moves around nicely.
All right, let's move on to our second example over on the right-hand side here. Right now there's nothing happening when we select different things over here, but I'm going to go ahead and jump into this little number down here. You can see right now, again, it's set to zero. This one is a little more complicated to set up. We went ahead and set up a parameter, so we would create a parameter exactly the same way we did before. Just a float, doesn't matter what the number is. That parameter down here that we created is called BAN 4, the big ass number 4, because this is a big ass number. That's what we're using. You can, again, set the display format, anything like that that you want.
Now, we can't drag the parameter directly out onto the visualization. That wasn't working for me earlier on. So, what I did was I went ahead and created a calculated field called the BAN calculated field, and all this does is it turns our BAN parameter into a BAN calculation. And then I went ahead, and I dragged that out onto our text field here. That is going to sit made it nice and big. I did do some formatting on this one just to make the number bigger so that it's nice and clear, and you'll see that it sits at zero right now.
If we jump back to our dashboard, we still don't have anything happening with this parameter when we select different items up in this visualization at the top here. We're going to do it by going to Dashboard and Actions. I'm going to add an action, going to Change the Parameter. The driver is going to be this sheet in the middle right here, Revenue Parameter Action Driver. That's this sheet on the right-hand side. I happen to know that because that is the one because I designed the workbook. I happen to know that because I designed the workbook. And we're going to run it when we select different points. Again, we're going to select our target parameter, which is the BAN parameter. The source field is going to be the sum of revenue. We're going to choose our aggregation, again it's sum. And once we click off items in the visualization, again, we want to set this to zero so that we don't have anything that's summing up at the bottom here when we don't have anything selected. Click OK, click OK again, and look. Now, we can sum up different months. If we want to, we can even click one point over here, one point over here, and one point over here, and see what those months add up to together. Really turns Tableau into a tremendous little calculator that allows you to do various ad hoc calculations, which is really, really cool.
Thanks for sticking with me through that video. If you did find it helpful, then please do give it a like, hit the Subscribe button. I'd love to see you on another video. We do talk about Tableau, we talk about Power BI, we talk about how to communicate better with data, and I look forward to seeing you next time.