0:00In 2020.3 Tableau have added the ability to
0:05set a default value for parameter actions.
0:08Let's check out what that means.
0:09I'm going to build a very basic view inside
0:11of Superstore Sales.
0:12You can follow along.
0:13I'm clicking this default data set here on
0:16the bottom left in the save data sources
0:18area.
0:19I'm just going to put the date onto the
0:21canvas, but before I do, I just want to
0:23look at sales
0:24and put that on rows as I've just done,
0:26order date across the top.
0:28Let's have this at the day level, and I'm
0:31just going to do a quick table calculation
0:33to do the moving average, and I'm going to
0:37go back into that to make it look at the
0:40previous
0:4030 days.
0:41So basically, it's doing a moving average
0:44of sales over the previous 30 days.
0:46And there you go.
0:47You can see that's now working correctly.
0:49And then we just click out of that, and we
0:51're pretty much set up for this demo.
0:53Now, the next thing I need to do is to
0:55create a parameter because the parameter
0:57actions
0:58are obviously going to change this
0:59parameter.
0:59So we need to create that as well.
1:01And I'm going to set it to a value of 4,000
1:04.
1:05That's important to remember this.
1:07And we're going to call this parameter
1:08three.
1:08I'm really lazy with naming things, so we
1:10'll keep it like that.
1:12Then I'll add a reference line into the
1:14visualization using that same parameter we
1:17've just created.
1:18So you can see it here behind us.
1:20I'm going to make it a little bit thicker
1:22so it's easy to see during this demo, and
1:24I'll make it dotted.
1:25Actually, I'll make it really, really thick
1:27so it's really easy to see in the recording
1:28.
1:28I'm just checking that now.
1:30Okay, so here's our parameter value set to
1:324,000.
1:33Now, we need to set an action to change
1:35this.
1:35But one of the problems is once you set
1:37that action, it's basically stuck at the
1:39last selected
1:40value.
1:41And so it would be nice if the user clicked
1:43away for it to fall back to a default value
1:46.
1:46So we go into worksheet here.
1:48Now, because I'm not in a dashboard, I'm
1:50going to the worksheet actions, not the
1:52dashboard
1:52actions.
1:53I'm in a worksheet.
1:55So this will only work in this worksheet.
1:58I'll click add, add action, change
2:00parameter, and we're in the right sheet, so
2:02this is all
2:03working fine.
2:04Now, in order to set this up, we need to
2:06first make sure we're targeting the correct
2:09parameters.
2:10So I'm selecting parameter three.
2:12The next thing I'd like to do is to change
2:14this value, the moving average sum of cells
2:17.
2:17So when I click on any data point in this
2:20visualization, it's going to pick up the
2:23value
2:23from this moving average of sum of cells.
2:27So I'm going to select that.
2:29And then we're going to look at this new
2:32option here on the left-hand side, which is
2:34clearing
2:35the selection will keep the current value,
2:37so the current value being what I've just
2:39selected.
2:40Or I can set the value itself.
2:41I'm going to set it to 3,500, just so we
2:43can see that it's actually different from
2:45the
2:46default of 4,000.
2:48So we're pretty much set up.
2:50Everything we needed to do is just here in
2:51the bottom.
2:52And this new value that we've been able to
2:55add here is actually the new capability.
2:58So I'm going to go ahead and click OK.
3:00Click OK again.
3:01And now we have our basic visualization
3:03ready to go.
3:03And of course, when I click on the chart,
3:05it picks up the new value and sets that as
3:07the parameter.
3:08But now watch what happens when I click
3:10away.
3:11It goes back to 3,500, the value we'd set
3:14as a default.
3:15So this is actually quite nice because
3:17having the ability to set it to default
3:19means, for
3:19example, that you can reset a view once the
3:22user's finished with it, once they click
3:24away.
3:25Or more importantly, the user can do what
3:27they expect to do in Tableau elsewhere.
3:30And typically, when they deselect
3:31selections, it removes filters.
3:33So the same should happen with parameters.
3:35So now this is a really nice addition.
3:38User can interact with their visualization.
3:40And then everything can change as a result.
3:43This is probably a better use case for
3:44things like dates when you want to
3:45dynamically pick
3:46a date.
3:47And then when the user clicks away, it goes
3:49back to a default date, maybe today, maybe
3:50some other value.
3:51But that's sort of how this would work.
3:54That's pretty much the feature in a
3:55nutshell.
3:55It's a very basic demo of how that works.
3:57If you've enjoyed this video, please be
3:59sure to check out some of the other videos
4:01on 2020.3
4:02on the channel.
4:03And also let us know what kind of content
4:05you'd like to see in the future.