0:00In 2093, Tableau have improved the aggreg
0:06ations available to you when you use
0:08parameter actions.
0:10To show you this, I'm first going to build
0:12a very basic chart. I'll drag profits onto
0:14columns and sales onto rows. I'll then
0:18break this down by city. I'll rotate this
0:2290 degrees
0:22just to make it easy to see. You'll also
0:26see that country and state have been
0:27brought into
0:28the view because they're part of the
0:29hierarchy. Next up, I'll create the
0:32parameter. The first
0:33one I'll create, we'll actually use to show
0:36the first quarter. Let's call this first
0:39quarter.
0:42I'll set this to value zero and hit okay. I
0:47'll duplicate this. Then I'll edit this.
0:52Call it third quarter. I'll also leave this
0:58as a value of zero. Then I'll show both of
1:02these parameter controls on our view on the
1:05right hand side. At the moment, these are
1:07both set to zero. The next thing I'll do is
1:10I'll add a reference line to reflect both
1:12of these values. I'll select first value. I
1:16'll give it a custom label. Select the value
1:21.
1:21I'll put FQ for first quarter. I'll make
1:25this line orange so it's a little bit easy
1:27to see.
1:28I'll make it thin. You'll see that because
1:32I selected zero, it sits on the axis. I'll
1:35add another reference line. This time, the
1:39third quarter. Again, I'll go to custom.
1:44Select
1:44a value. Then I'll put TQ. I'll make this
1:47line a slightly different color. I'll make
1:51it green. I'll also make it thin. You'll
1:55see here that both items are now on that
1:57axis.
1:58If you want to, you can move one of these
2:01labels to the right hand side. All you have
2:04to do is go to the alignment, select the
2:06right hand side, and you'll see the first
2:09quarter
2:09labels on the left and the third quarter
2:12labels on the right. Both of them are
2:14sitting on
2:15the zero axis. Now, the final step is to
2:18get this parameter action to change these
2:21values.
2:22I'll head up to worksheet actions. I'll add
2:26the first action by selecting change
2:29parameter.
2:31We'll affect the first quarter. We have to
2:34make sure we choose the right value here
2:37because
2:38if I was to say choose sales, I would
2:41actually be showing the first quarter for
2:43the selection
2:44on the sales which is not where I've
2:47actually set the reference lines. What I
2:49need to actually
2:50do is make sure I choose profit which is on
2:52my Y axis because that's the axis I use for
2:54the reference lines. I'll select profit and
2:57you'll see here that we have first quarter
3:00and third quarter as the new aggregations.
3:03You won't, however, see the third option
3:04which
3:05is concatenation. We'll come to that in a
3:07second. Select first quarter. I'll call
3:10this
3:11FQ action so it's easy to reference it
3:15later. Click okay. Click okay and we'll
3:19test this
3:20out. If I select four items, you'll see
3:22that the first quarter changes to reflect
3:25and when
3:26we deselect, that stays. Right. Let's apply
3:29the second one. Let's go to actions, add an
3:32action, change parameter. This time the
3:35third quarter, field, profit, third quarter
3:39is the
3:40aggregation. Hit okay. Before we do that,
3:43we need to remember to change our names. I
3:46'll
3:46call this third quarter. It's always good
3:51to label your parameters. Now when we
3:54select
3:55the items, both lines change to reflect the
3:59options. You can also see the parameter
4:01values
4:01are updating here on the right hand side.
4:04Now the last step is to use the concaten
4:07ation
4:07option to show a list of the selected
4:10values when we made the selection. In order
4:13to do
4:13this, I need to create one more parameter.
4:15I'll create a parameter by clicking in the
4:18white space and I'll call this the cities
4:21parameter. The reason being is that I'm
4:25going
4:25to dynamically feed a list of cities into
4:33this option. The default value is going to
4:38be a hyphen and you'll notice that I set
4:43this up to be a float. It actually needs to
4:46be
4:46a string in order to work. I set that to a
4:49hyphen and click okay. Then I'll show this
4:52parameter on the right hand side. Now we've
4:54got our third aggregation type that's been
4:56added in this release. The last thing to do
5:00is to apply an action so that when I select
5:02a group of marks, it's going to dynamically
5:08feed a list of cities into that parameter
5:14and it's going to concatenate them into
5:18that parameter. I hit okay. The last thing
5:21I need
5:21to do is to have the list show in a
5:24particular place. I'm going to do this by
5:28putting that
5:28parameter in my title, setting the font to
5:32about 11, hit apply. You'll notice that I
5:37can't see anything at the moment. When I
5:41select four items, you'll see that the four
5:44cities
5:44I selected, Berlin, Madrid, Paris, and
5:47Vienna are also available to us. Now what I
5:50could
5:51do is also add the values from our
5:56parameter into this as well. I'll just use
6:01an abbreviation
6:02so that it's easy to see. I'll make this
6:06one size smaller again just to give it some
6:10differentiation.
6:13You'll see here I added the label in the
6:16wrong place. I need to actually add it
6:20after. Hit
6:22apply and you'll now see that the values
6:24are showing. I've got a lot of decimal
6:27places
6:27in there but that's just an example of how
6:30you can use the new functionality to
6:33generate
6:33lists and calculations available to you
6:36that stay available after you've deselected
6:39the
6:39items. That's it.
6:41it.
6:41Hope you have a fantastic weekend.