Hello and welcome back to your tableau certified associate training course super excited to have you
back here.
And so far we've done almost everything with our sets we have this beautiful map where you can have
a table for our shortlist for me and my wife so we can go and pick a country where we want to live what
else can we do here.
Well we can make our sets even more powerful.
How do we do that with parameters.
I promise that parameters would jump into the course here and there.
Well this is one of those times because parameters give you power give you control.
So how can we add a parameter.
Well let's have a look at this.
This position over here we have death rate versus infant mortality rate.
I remember we had these arbitrary values where we said OK we want the death rate to be below eight because
we saw that the average is seven point sixty four.
So we said OK let's have it below eight.
And then the infant mortality rate was on average among all countries in the world at twenty one point
eighty eight.
Let's have it below 20.
So those were arbitrary numbers that we came up with.
And they're affecting my wife's shortlist which is these pink countries over here and that's affecting
this map.
And that is affecting our short list.
So that is all great if we're set on those numbers.
But what if we want to be able to adjust them in order to adjust them we would need to go into my wife's
short list or actually would need to go into each one of these first at its set would go to change this
number from an eight or nine or something else and then we'd go to the infant mortality set and so on.
So quite a lot of work involved.
So how about we build parameters to control those values.
Let's do it.
So right click in here and select create parameter.
So this parameter is going to be Max death rate sounds so scary is going to be a float parameter is
going to start at the value that we selected which was eight right.
Eight Yep current when the value in workbook pops and opens current value display format automatic is
fine.
So we're going to give it a range is going to start from 1 or actually going start from zero why not.
Maybe there is a country where nobody ever dies and then it can go all the way up to let's say looks
like 16 is your maximum right.
Looks like it never goes above 16.
So let's set it at 16.
Step size it's a float so we'll give it zero point five click OK.
There is a parameter remember of parameter.
There's three things we need to do.
First one is create the parameter.
Number two is use the parameter.
So let's go to our death rate click edit set and here instead of less than eight we'll do formula because
we could.
We can't just put the parameter in here unfortunately.
You know like with top we could just select we could select create a parameter or select the parameter
but we're not doing top we're doing condition.
So here we'll just write a formula.
I know it might sound a little bit like we're not prepared for writing formulas and Tableau but it's
very simple trust me.
This is going to be very easy and you'll be proud of yourself at the end of it.
So we're just gonna write death rate.
Just click.
As soon as it pops up just right.
Selected actually.
Sorry.
First we need to.
Gonna write some then.
Because here aggregation with some.
Then we'll start writing death rate.
It'll come in close the bracket go less then and then put in your parameter.
So in this case Max death rates just click enter.
So your results should look like the sum of death rate should be less than Max death rate click OK.
So that's the second thing we need to do for parameter.
And the third thing we do.
So create use.
And the third thing is show.
So we want to show parameter control.
Let's move it over here and there is your parameter control.
So if it's not a slider.
Make sure just to select the slider option.
But it should be a slider if you selected to give it a range.
So now if you slide this around you'll see that the pink is growing or is decreasing.
Fantastic.
To make it even more amazing.
We're going to click this line over here.
This average line that we have and we'll click edit and then instead of this value here we're just gonna
change it to a max parameter.
Nothing else needs changing to say change the value to Max death rate.
And voila.
So we're using our parameter twice.
We're using it in the set and we're using it here.
And so now as we slide it along Look how beautiful our value actually out our line actually slides along.
Voila.
Fantastic.
So that was the first part and now I'm gonna do the same thing for this line for infant mortality.
If you want to pause the video and do it yourself please go for it because this is a great time to practice.
All right.
So let's do it.
So let's create a new parameter.
This one is gonna be called Max in front.
Mortality rate.
This is going to be data type floats.
Correct.
We're gonna start with giving it a range minimum is a 1 well in minimum is 0.
Ideally maximum looks like it goes up to 90 so let's give it a maximum of 90.
Step size zero point five is too low so we'll keep it at 1 because we have all like 90 options and here
current value will start at 20.
Okay.
Click Okay so create parameter use parameters show parameters.
So now we got to use it low infant mortality rate.
Edit set again by formula.
So we go some infant mortality rate is less than Max.
Infant mortality rate.
So make sure it says this some infant mortality rate less than Max.
Infant mortality rate.
CLARK Okay so we're using it and now we want to show it.
Right.
So Max infant mortality rate show parameter control drag it over here.
So if we move this around you'll see that the pink is growing sideways now.
Great.
This pink we maybe needs a bit more capacity.
Let's put on 75.
And also we want to adjust this average line to show Max infant mortality rate.
So there we go as you adjust this.
Your line moves as well.
How wonderful is that great so you can increase the catchment of countries.
So if my wife decides that my half rate Max they're afraid of aid was a bit too stringent she might
want to bring it up to 13 or 14.
Or she might win bring it down to two.
Which would mean United Arab Emirates and Qatar.
Okay.
So there's the control so let's see how this plays out in our.
So that's my shortlist and see my wife's shortlist.
Right.
So again show parameter control.
Death rate show parameter control for infant mortality rate as you can see now we have way more control
so she goes all the way.
Idea ultimate is should soaked all the countries.
Yeah for some reason.
Greenland is not selected.
Maybe it was beyond the 16 and 19.
No.
Maybe just we don't have data for it.
Not sure but like this you can see like if we reduce Max infant mortality rate no more than 5.
Let's see what we get.
We're left with these countries on the other hand if we reduce death rate down to say 4 or 5 again we're
left with these kind.
How interesting is that death rate is low here infant mortality.
So you're more likely to survive as an infant in these countries right.
But then you're more likely.
So I was an adult in these countries.
That's so cool.
OK so those are my wife's.
That's why my wife's shirtless and let's check out how this affects our shortlist now.
So let's show control.
Max death threat show parameter control put it here Max.
Infant mortality mortality rate show parameter control over here.
Voila.
As we increase my wife's criteria her sets change and her combined such change.
But not that not all countries are popping up because this is our criteria.
So I also have a say in this.
This is combined with my short list and my short list was as you remember static.
And that means that what is in my short list is stays there and cannot they cannot be changed even if
a parameter thereby even if my wife increases her criteria to the maximum.
This is just going to reflect everything in my short list.
So there we go.
Now we can sit down and look at this map and decide okay well death threat maybe you know we'll be very
careful and try to be like avoid any kind of danger.
So we'll be we will be a k of 12 but infant mortality rate we're only the maximum we'll go is 12th.
Right.
So let's reduce is down to 12.
So while South American countries Argentina amazing might go live in Argentina love Argentina.
Well I haven't been there but I would love to go to Argentina.
So there we go.
As you can see parameters give you a lot more control.
And again is this also fixed it changes our table so you can go to show parameter control here as well.
Whereas there it is on the right and show parameter control again put this here so as you adjust this
again it also changes the table so it gives you more information on the countries that would be okay
to visit or to go live in.
So there we go.
My friends this was the criteria for selecting a country and now that we have this list of let's say
Max for a twelve infant mortality or mortality rate 12 I would probably I don't know it's a tough choice
Argentina sounds very interesting to me I would probably of had to pick right now I would go pick Argentina
like Oh I love a lot of countries.
I live in Australia myself but if I had to choose something different right now I would go and out of
this list choose our dinner here and there you go that's how data and advanced tableau skills or even
you know this is or it is slightly getting to the advanced space but doesn't feel that advance.
Right.
It's like we learn this very quickly and so this is how data and their analysis and Tableau skills can
help you even make life decisions and choices.
So there we go.
That was our visualization for this section.
And don't forget your homework.
That will be outlined in the following tutorial and I look forward to seeing you there.
And until next time happy analyzing.